rhypersphere {gena} | R Documentation |
Hypersphere
Description
Simulates uniform random variates from the hypersphere.
Usage
rhypersphere(n, dim = 2, radius = 1, center = rep(0, dim), type = "boundary")
Arguments
n |
number of observations to simulate. |
dim |
dimensions of hypersphere. |
radius |
radius of hypersphere. |
center |
center of hypersphere. |
type |
character; if |
Value
The function returns a vector of random variates.
Examples
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))
[Package gena version 1.0.0 Index]