donut_data {spatgeom} | R Documentation |
Donut example
Description
Generate data points with the shape of a donut.
Usage
donut_data(n, a, b, theta)
Arguments
n |
Number of data points. |
a |
Lower bound of the second variable. |
b |
Upper bound of the second variable. |
theta |
Angle of the donut. |
Value
A data frame with three variables. Variable 'y' is the response, variable 'x1' makes the donut shape with 'y', and 'x2' is a uniform random variable between a and b. '
Examples
xy <- donut_data(n = 30, a = -1, b = 1, theta = 2 * pi)
[Package spatgeom version 0.3.0 Index]