dij

From LHD v0.1.0
0th

Percentile

Calculate the Inter-site Distance

dij returns the inter-site distance of two design points of a LHD

Usage
dij(X, i, j, q = 1)
Arguments
X

A Matrix.

i

A positive integer.

j

A positive integer.

q

The default is set to be 1, and it could be either 1 or 2.

Details

• X stands for the design matrix.

• i stands for the i^th row of X.

• j stands for the j^th row of X.

• Both i and j should be in [1,nrow(X)] and they should not be equal to each other.

• If q is 1 (the default setting), dij is the rectangular distance. If q is 2, dij is the Euclidean distance.

Value

If all inputs are logical, then the output will be a positive number indicating the distance.

• dij
Examples
# NOT RUN {
#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)
# }
Documentation reproduced from package LHD, version 0.1.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.