Reputation:
I have this Surv object called y1. When I call the length() and nrow() function on it, I get different values. By inspection, y1 seems to have the number of elements that nrow() returns. Why does length() not work?
y1 <- Surv(time = inputTime, event = inputEvent, type = "right")
Upvotes: 1
Views: 200
Reputation:
Since this Surv object has two columns, length() would give the total number of cells.
Answer courtesy by joran.
Upvotes: 1