Compute cycledays and phases from dates and provided starts of cycles.
dot-compute_phase_and_cycleday.Rd
Compute cycledays and phases from dates and provided starts of cycles.
Examples
random_data =
expand.grid(
subject = 1,
item = 1:24,
date = seq(as.Date("2020-01-01"), as.Date("2020-03-01"), by = 1)
)
random_data$drsp_score <- sample(1:6, nrow(random_data), replace = TRUE)
random_data$is_cycle_start <-
ifelse(
random_data$date %in%
c(as.Date("2020-01-15"), as.Date("2020-02-20")),
TRUE, FALSE)
# augmented_data <- .compute_phase_and_cycleday(random_data, sep_event = "ovulation")
# colnames(augmented_data)