Description Usage Arguments Value Examples
Sample Uniformily from various objects centered at the origin
1 2 3 | rUnifSphere(n, D, radius = 1, shell_only = FALSE)
rUnifSimplex(n, D)
|
n |
number of samples to produce |
D |
dimension of object |
radius |
radius of sphere to sample from |
shell_only |
if TRUE samples from shell of object only, if false samples from entire region of object |
matrix of dimension D x n
1 2 3 4 5 6 7 8 9 10 11 | # Sample Uniformily from Sphere (Full)
x <- rUnifSphere(1000, 2, 2)
plot(t(x), asp=1)
# Sample Uniformily from Sphere (Shell Only)
x <- rUnifSphere(1000, 2, 2, shell_only=TRUE)
plot(t(x), asp=1)
# Sample Uniformily from Simplex
x <- rUnifSimplex(1000, 2)
plot(t(x), asp=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.