Description Usage Arguments Value Author(s) Examples
Creates a latin Hypercube Design (LHD) with userspecified dimension and number of design points. LHDs are created repeatedly created at random. For each each LHD, the minimal pairwise distance between design points is computed. The design with the maximum of that minimal value is chosen.
1 
x 
optional matrix x, rows for points, columns for dimensions. This can contain one or more points which are part of the design,
but specified by the user. These points are added to the design,
and are taken into account when calculating the pairwise distances.
They do not count for the design size. E.g., if 
lower 
vector with lower boundary of the design variables (in case of categorical parameters, please map the respective factor to a set of contiguous integers, e.g., with lower = 1 and upper = number of levels) 
upper 
vector with upper boundary of the design variables (in case of categorical parameters, please map the respective factor to a set of contiguous integers, e.g., with lower = 1 and upper = number of levels) 
control 
list of controls:

matrix design
 design
has length(lower)
columns and (size + nrow(x))*control$replicates
rows.
All values should be within lower <= design <= upper
Original code by Christian Lasarczyk, adaptations by Martin Zaefferer
1 2 3 4 5 6 7 8 9 10 11 12  set.seed(1) #set RNG seed to make examples reproducible
design < designLHD(,1,2) #simple, 1D case
design
design < designLHD(,1,2,control=list(replicates=3)) #with replications
design
design < designLHD(,c(1,2,1,0),c(1,4,9,1),
control=list(size=5, retries=100, types=c("numeric","integer","factor","factor")))
design
x < designLHD(,c(1,10),c(2,10),control=list(size=5,retries=100))
x2 < designLHD(x,c(1,10),c(2,10),control=list(size=5,retries=100))
plot(x2)
points(x, pch=19)

[,1]
[1,] 1.263041
[2,] 1.884061
[3,] 1.385613
[4,] 1.539136
[5,] 1.638049
[6,] 1.989545
[7,] 1.064432
[8,] 1.174108
[9,] 1.460530
[10,] 1.790308
[,1]
[1,] 1.234723
[2,] 1.113144
[3,] 1.937449
[4,] 1.363142
[5,] 1.539008
[6,] 1.768963
[7,] 1.868941
[8,] 1.055490
[9,] 1.442962
[10,] 1.645272
[11,] 1.234723
[12,] 1.113144
[13,] 1.937449
[14,] 1.363142
[15,] 1.539008
[16,] 1.768963
[17,] 1.868941
[18,] 1.055490
[19,] 1.442962
[20,] 1.645272
[21,] 1.234723
[22,] 1.113144
[23,] 1.937449
[24,] 1.363142
[25,] 1.539008
[26,] 1.768963
[27,] 1.868941
[28,] 1.055490
[29,] 1.442962
[30,] 1.645272
[,1] [,2] [,3] [,4]
[1,] 0.47650936 1 3 0
[2,] 0.69078219 3 6 0
[3,] 0.49528255 2 1 1
[4,] 0.07150406 4 7 1
[5,] 0.99685732 0 9 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.