donut_data: Donut example

View source: R/data.R

donut_dataR 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)

spatgeom documentation built on April 27, 2023, 1:11 a.m.