dij | R Documentation |
dij
returns the inter-site distance of two design points of an LHD
dij(X, i, j, q = 1)
X |
A matrix object. In general, |
i |
A positive integer, which stands for the ith row of |
j |
A positive integer, which stands for the jth row of |
q |
The default is set to be 1, and it could be either 1 or 2. If |
If all inputs are logical, then the output will be a positive number indicating the distance. dij = \left\{ \sum_{k=1}^{m} \vert x_{ik}-x_{jk}\vert ^q \right\}^{1/q}
#create a toy LHD with 5 rows and 3 columns
toy=rLHD(n=5,k=3);toy
#Calculate the inter-site distance of the 2nd and the 4th row of toy (with default q)
dij(X=toy,i=2,j=4)
#Calculate the inter-site distance of the 2nd and the 4th row of toy (with q=2)
dij(X=toy,i=2,j=4,q=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.