pivot_day.RdConverts a "one day, multiple observations" dataframe to a PRISM-compatible format. However, this function does not filter for days - input must all be the same day.
pivot_day(df)A data.frame with 4 columns: day | condition | dead | censored.
vial column is optional.
A data.frame in a PRISM-compatible format. First column is day,
subsequent columns are the other conditions. Each column has a series of 1(dead) and 0 (censored)
corresponding to the number of dead and censored per day.