search for: tree_liv

Displaying 1 result from an estimated 1 matches for "tree_liv".

Did you mean: tree_live
2012 Apr 13
1
Coding columns for survival analysis
...was alive or dead. I want to recode the columns such that the cell reads "found" when a live tree is first observed, "alive" for when a tree is found alive and is not just found, and "mort" when it was previously alive but is now dead. Given the following: > tree_live = data.frame(tree = c("tree1","tree2","tree3","tree4","tree5"), live1 = c(0,0,0,1,1), live2 = c(0,0,1,1,0), live3 = c(0,1,1,0,0), live4 = c(1,1,0,0,0), live5 = c(1, 0, 0, 0, 0)) tree live1 live2 live3 live4 live5 1 tree1 0 0...