<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Interpoint Distance Matrix for Standardized Data</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="https://rpkg.net/assets/examples.css" />
</head><body>

<table width="100%" summary="page for dist.std.data"><tr><td>dist.std.data</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Interpoint Distance Matrix for Standardized Data</h2>

<h3>Description</h3>

<p>This function computes and returns the distance matrix computed by using the specified distance measure 
to compute the distances between the rows of a data matrix which is standardized row or column-wise.
That is, the output is the interpoint distance (IPD) matrix of the rows of the given set of points <code>x</code>
<code>dist</code> function in the <code>stats</code> package of the standard R distribution.
The argument column is the logical argument (default=<code>TRUE</code>) to determine row-wise or column-wise standardization.
If <code>TRUE</code> each column is divided by its standard deviation, else each row is divided by its standard deviation.
This function is different from the <code>dist</code> function in the <code>stats</code> package.
<code>dist</code> returns the distance matrix in a lower triangular form, and dist.std.data returns in a full matrix
of distances of standardized data set.
... are for further arguments, such as <code>method</code> and <code>p</code>, passed to the <code>dist</code> function.
</p>


<h3>Usage</h3>

<pre>
dist.std.data(x, column = TRUE, ...)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
<p>A set of points in matrix or data frame form where points correspond to the rows.</p>
</td></tr>
<tr valign="top"><td><code>column</code></td>
<td>
<p>A logical argument (default is <code>TRUE</code>) to determine whether standardization is row-wise or
column-wise. If <code>TRUE</code> it is column-wise else row-wise standardization.</p>
</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
<p>Additional parameters to be passed on the <code>dist</code> function.</p>
</td></tr>
</table>


<h3>Value</h3>

<p>A distance matrix whose  <i>i,j</i>-th entry is the distance between rows <i>i</i> and <i>j</i> of <code>x</code>, which is
standardized row-wise or column-wise.
</p>


<h3>Author(s)</h3>

<p>Elvan Ceyhan
</p>


<h3>See Also</h3>

<p><code>dist</code>, <code>ipd.mat</code>, and <code>ipd.mat.euc</code>
</p>


<h3>Examples</h3>

<pre>
n&lt;-20  #or try sample(1:20,1)
Y&lt;-matrix(runif(3*n),ncol=3)
ipd&lt;-ipd.mat(Y)
range(ipd)

ipd2&lt;-dist.std.data(Y) #distance of standardized data
range(ipd2)

ipd2&lt;-dist.std.data(Y,method="max") #distance of standardized data
range(ipd2)

#############
Y&lt;-matrix(runif(60,0,100),ncol=3)
ipd&lt;-ipd.mat(Y)
range(ipd)

ipd2&lt;-dist.std.data(Y) #distance of standardized data
range(ipd2)

</pre>


</body></html>
