Learn R Programming

stackoverflow (version 0.7.0)

sincos: sin/cos pairs for modeling

Description

Compute the sin and cos of x.

Usage

sincos(x, period = 168/2/pi)

Arguments

x

a vector

period

a scalar, which x is scaled by

Value

a matrix containing a _sin and _cos column

References

https://stackoverflow.com/questions/51874305/tuple-variable-in-r-regression-model/54393605#54393605

Examples

Run this code
# NOT RUN {
data(sunspots)
lm(sunspots~sincos(time(sunspots), 5/pi))

# }

Run the code above in your browser using DataLab