rhypersphere | R Documentation |
Simulates uniform random variates from the hypersphere.
rhypersphere(n, dim = 2, radius = 1, center = rep(0, dim), type = "boundary")
n |
number of observations to simulate. |
dim |
dimensions of hypersphere. |
radius |
radius of hypersphere. |
center |
center of hypersphere. |
type |
character; if |
The function returns a vector of random variates.
set.seed(123) # Get 5 random uniform variates from 3D hypersphere # of radius 10 centered at (2, 3, 1) rhypersphere(n = 5, dim = 3, radius = 10, center = c(2, 3, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.