dot-compute_phase_and_cycleday.Rd
Compute cycledays and phases from dates and provided starts of cycles.
.compute_phase_and_cycleday(data, sep_event)
a data.frame that contains symptoms reported subjects.
The data must be in a long format and have the following columns:
subject
, item
, drsp_score
a character XXX
the same data.frame as data with additional columns.
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")
#> Error in .compute_phase_and_cycleday(random_data, sep_event = "ovulation"): could not find function ".compute_phase_and_cycleday"
colnames(augmented_data)
#> Error in is.data.frame(x): object 'augmented_data' not found