powered by
Convert a list of treatment lines for multiple treatment strategies to a data.table.
data.table
create_lines_dt(strategy_list, strategy_ids = NULL)
Returns a data.table in tidy format with three columns:
Treatment strategy ids.
Line of therapy.
Treatment ID for treatment used at a given line of therapy within a treatment strategy.
A list where each element is a treatment strategy consisting of a vector of treatments.
A numeric vector denoting the numeric id of each strategy in strategy_list.
strategy_list
strategies <- list(c(1, 2, 3), c(1, 2)) create_lines_dt(strategies)
Run the code above in your browser using DataLab