R/spread_paths.R
spread_paths.Rd
Spread the information in dose_finding_paths object to a wide data.frame format.
spread_paths(df = NULL, dose_finding_paths = NULL, max_depth = NULL)
Optional data.frame
like that returned by
as_tibble(dose_finding_paths). Columns .depth, .node, .parent are required.
All other columns are spread with a suffix reflecting depth.
Optional instance of dose_finding_paths. Required if `df` is null.
integer, maximum depth of paths to traverse.
A data.frame
if (FALSE) {
# Calculate paths for the first two cohorts of three patients a CRM trial
skeleton <- c(0.05, 0.1, 0.25, 0.4, 0.6)
target <- 0.25
cohort_sizes <- c(3, 3)
paths <- get_dfcrm(skeleton = skeleton, target = target) %>%
get_dose_paths(cohort_sizes = cohort_sizes)
}