df <- data.frame(lex.id = rep(c(3, 7), c(3, 5)))
df$new.state <- sample(LETTERS[2:4], 8, r = TRUE)
df$cut <- round(runif(8) * 100) + 1
df
Lx <- Lexis( exit = list(time=c(89, 97)),
id = c(3, 7),
exit.status = factor(c("A", "X")) )
Lx
rcutLexis(Lx, df, pre = "A")
Run the code above in your browser using DataLab