Re: [Bioc-devel] DataFrame errors with a Surv class column

2017-05-30 Thread Michael Lawrence
tail() is broken for Surv objects, because despite Surv objects exposing their implementation as matrices (probably a bad decision), they do not inherit from class "matrix". One option is to make length.Surv return the number of elements (rows in the matrix) instead of the number of cells, but who

[Bioc-devel] DataFrame errors with a Surv class column

2017-05-28 Thread Levi Waldron
Running and updated Bioc 3.5: > library(survival) > set.seed(1) > cens <- sample(0:1, 100, replace=TRUE) > time <- rnorm(100) > df = DataFrame(time=time, cens=cens, y=Surv(time, cens)) > df[1:3, ] #OK DataFrame with 3 rows and 3 columns time cens y.from