runif_cube | R Documentation |
Sample uniformly in or on a hyperspheres or hypercubes.
runif_cube(n, m = 2, max.dist = 1, at = FALSE, nr.dist = 21) runif_sphere(n, m = 2, max.radius = sqrt(m), at = FALSE, nr.rad = 21)
n |
number of points to sample |
m |
number of design factors |
max.dist |
maximum distance from origin (L-infinity norm/supremum distance) for the hypercuboidal design region (enveloping hypercube) |
at |
logical indicating whether to sample on concentric hyperspheres/hypercubes or not. With this
option |
nr.dist |
the number of concentric hypercubes to use in case at is |
max.radius |
maximum radius of the hyperspherical design region (enveloping hypersphere) |
nr.rad |
number of concentric hyperspheres to sample on in case of |
Pieter C. Schoonees
Pieter C. Schoonees, Niel J. le Roux, Roelof L.J. Coetzer (2016). Flexible Graphical Assessment of Experimental Designs in R: The vdg Package. Journal of Statistical Software, 74(3), 1-22. doi: 10.18637/jss.v074.i03.
set.seed(1234) runif_sphere(n = 10) set.seed(1234) samp <- runif_sphere(n = 500, at = TRUE) plot(samp, asp = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.