circ_seq: Sequence generation for circular data

View source: R/circular_functions.R

circ_seqR Documentation

Sequence generation for circular data

Description

Sequence generation for circular data

Usage

circ_seq(from, to, int, by, length.out = NULL)

Arguments

from, to

the starting and (maximal) end values of the sequence. Of length 1 unless just from is supplied as an unnamed argument.

int

A numeric value. The number of units of x in a full circle, e.g., for unit days: int = 365; for unit months: int = 12.

by

number: increment of the sequence.

length.out

desired length of the sequence. A non-negative number, which for seq and seq.int will be rounded up if fractional.

See Also

seq

Examples

circ_seq(5, 8, int = 12) ## expected c(5, 6, 7, 8)
circ_seq(-7, 8, int = 12) ## expected c(5, 6, 7, 8)
circ_seq(-2, 3, int = 12) ## expected c(10, 11, 12, 1, 2, 3)
circ_seq(-2, 3, int = 12, by = 2) ## expected c(10, 12, 2)
circ_seq(-2, 3, int = 12, length.out = 3) ## expected c(10, 0.5, 3)

DrylandEcology/rSW2utils documentation built on Dec. 9, 2023, 10:44 p.m.