I have a large data set taken over 13 years including many plots and a treatment. The response variable being tracked is mortality and the data is currently in a summed format. To run Kaplan-Meier or other survival analyses, I need the data in the unsummed format (each individual coded with their status 0=alive, 1=dead) and the date upon which they died, as well as plot and treatment they are from. A snippet of the data frame I have looks like this:
Current data frame format with mortality summed across individuals.
What I am trying to get to looks like this:
Or this simpler version would be okay too: