This function generates random numbers from p-dimensional unit sphere.

runifsphere(n, p = 2)

Arguments

n

number of random samples.

p

dimension of the unit sphere.

Examples

x <- runifsphere(n = 100) plot(x)