Displaying 1 result from an estimated 1 matches for "dft12merge".
2006 Dec 05
0
How to join data.frames containing Surv objects?
...<- df.test[1:3,]; dft1; str(dft1); class(dft1$survobj) # class is Surv
dft2 <- df.test[4:5,]; dft2; str(dft2); class(dft2$survobj) # class is Surv
## rbind in one data.frame
dft12 <- rbind(dft1, dft2); dft12; str(dft12); class(dft12$survobj) #
class is matrix
## merge in one data.frame
dft12merge <- merge(dft1, dft2, all=TRUE, sort=FALSE)
dft12merge; str(dft12merge); class(dft12merge$survobj) # class is matrix