donut_data {spatgeom} | R Documentation |
Generate data points with the shape of a donut.
donut_data(n, a, b, theta)
n |
Number of data points. |
a |
Lower bound of the second variable. |
b |
Upper bound of the second variable. |
theta |
Angle of the donut. |
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. '
xy <- donut_data(n = 30, a = -1, b = 1, theta = 2 * pi)