Learn R Programming

MultiRNG (version 1.2.4)

generate.point.in.sphere: Point Generation for a Sphere

Description

This function generates s points on a d-dimensional sphere.

Usage

generate.point.in.sphere(no.row,d)

Arguments

no.row

Number of rows to generate.

d

Number of variables to generate.

Value

A \(no.row \times d\) matrix of coordinates of points in sphere.

References

Marsaglia, G. (1972). Choosing a point from the surface of a sphere. Annals of Mathematical Statistics, 43, 645-646.

Examples

Run this code
# NOT RUN {
generate.point.in.sphere(no.row=1e5,d=3)
# }

Run the code above in your browser using DataLab