Converts bulk survival data (multiple observations per row) to individual survival data (one observation per row). Transforms this to a GraphPad PRISM compatible format, with one condition per column. Empty values are filled with NA.

pivot_prism(df)

Arguments

df

A data.frame object with 4 columns. Column headers must be ("condition", "day", "dead", "censored").

Details

Status: 1 = dead, 0 = censored.

Examples

df_prism <- pivot_prism(sample_data)