I'm rerunning code from 2 years ago and am encountering a new error with the survSplit function. The error says that my object cannot be found, even though it is a defined column in my dataframe.
Here is an example of my dataframe:
f12 <- data.frame(id = 1:6,
next.ivl= c(22.348, 1.837, 2.051,1.782,1.692, 1.730),
event = c(0,1,1,0,1,1),
cutpoints.l <- c(10/12, 1.25, 1.75, 2.25, seq(3,11))
f12.split <- survSplit(f12,
cut = cutpoints.l,
event = "event",
start = "enter",
end = "next.ivl",
episode = "ivl")
The first argument is supposed to be formula and you are giving it a data.frame. I realize this reference page appears to be a recent (even cutting edge) version looking at the URL but the current released version of pkg:survival is 2.39-5 and that page is referencing version 2.38-3. The current version of the help page for
survSplit does reference an earlier version of the function which lacked a formula interface and has examples that run without error on my instance of R 3.3.1.