powered by
Function to sample uniformly distributed observations on the unit sphere.
runifsphere(n, p)
a matrix.
number of random samples.
dimension of the unit sphere.
Klaus Nordhausen
Oja, H. (2010), Multivariate Nonparametric Methods with R, Springer.
X <- runifsphere(100,2) plot(X, pty = "s")
Run the code above in your browser using DataLab