Learn R Programming

globe (version 1.2-0)

runifsphere:

Description

These functions generate random points on a sphere using different rules.

Usage

runifsphere(n)
 runifsphere.wrong(n)

Arguments

n
The number of points to be simulated.

Value

A data frame containing two columns of coordinates: the first column for longitude, the second column for latitude.

Details

runifsphere generates uniformly-distributed random points on the sphere.

runifsphere.wrong generates random points which are uniformly distributed in (longitude, latitude) coordinates. These are not uniformly distributed on the sphere.

Examples

Run this code
  runifsphere(10)
  runifsphere.wrong(10)

Run the code above in your browser using DataLab