split024intervals: Split data frame containing ZTs over the 24/0 border

split024intervalsR Documentation

Split data frame containing ZTs over the 24/0 border

Description

Split data frame containing ZTs over the 24/0 border

Usage

split024intervals(
  df,
  grp = rlang::quo(what),
  x = "x",
  y = "y",
  xend = "xend",
  yend = "yend"
)

Arguments

df

Data frame to split

grp

Grouping variable (quosure), split will be made for each group

x

Starting points, secondary variable in polar coordinates, e.g. length or amplitude

y

Primary polar variable, e.g. time of day, ZT

xend

Corresponding x end points

yend

y end points

Value

Split data frame

Examples

# From plot in our paper 10.1073/pnas.1613103114
PFK <- 10.626
PFKup <- PFK + 2.9822/2
PFKdown <- PFK - 2.9822/2
ciopt <- dplyr::data_frame(x=1.25,
                    y=c(PFKdown + 7, PFKdown + 12) %% 24,
                        xend=1.25,
                        yend=c(PFKup + 7, PFKup + 12) %% 24,
                        what=c("PDH", "GS"))
ciopt
split024intervals(ciopt)

powestermark/pwrutilities documentation built on Dec. 28, 2024, 4:44 a.m.