Learn R Programming

dispRity (version 1.7.0)

random.circle: Random circle

Description

Creates coordinates for a random circle

Usage

random.circle(n, distribution, inner = 0, outer = Inf, ...)

Arguments

n

The number of pairs x,y of coordinates.

distribution

The distribution from which the coordinates are sampled.

inner

Optional, the radius for an empty inner circle.

outer

Optional, the maximum radius for the circle.

...

Any additional argument to be passed to distribution.

Author

Thomas Guillerme

See Also

space.maker

Examples

Run this code
## A simple uniform circle
plot(random.circle(1000, runif), pch = 20)

## A normal ring with inner and outer boundaries
plot(random.circle(1000, rnorm, inner = 0.5, outer = 5), pch = 20)

Run the code above in your browser using DataLab