get period variables with same return value

period_variable(
  x,
  period,
  range = c(0, period),
  range.inclusion = c("left", "both", "right", "neither"),
  simplify = F
)

Arguments

x

a vector of variables in one period

period

the period

range

the range in which variables (usually with the same values with x) will be returned

range.inclusion

left or right inclusion for range

simplify

return list or not, see sapply

Value

a vector

Examples

period_variable(pi, 2*pi, c(-pi, 5*pi))
#> [[1]] #> [1] -3.141593 3.141593 9.424778 #>