observed_timepoints <- c(0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89)
scheduled_timepoints <- c(0, 1, 2, 3, 4, 5, 10, 15, 20, 30, 50, 75)
bin_timepoints(
observed_timepoints,
scheduled = scheduled_timepoints
)
bin_timepoints(
observed_timepoints,
scheduled = scheduled_timepoints,
breaks = c(-Inf, 0.1, 1.5, 2.5, 3.5, 4.4, 7, 11, 15.1, 21, 31, 58, 80)
)
bin_timepoints(
observed_timepoints,
scheduled = scheduled_timepoints,
labels = month.name
)
bin_timepoints(
observed_timepoints,
scheduled = scheduled_timepoints,
labels = make_visit_labels(scheduled_timepoints, visit = "Week")
)
bin_timepoints(observed_timepoints)
Run the code above in your browser using DataLab