TABLE OF CONTENTS


S3Methods/splinesurv.data.frame [ Functions ]

NAME

    splinesurv.data.frame --- splinesurv method for data frames

FUNCTION

This function takes in a data frame in the format required by splinesurv.agdata except for the sorting order. It simply makes sure that the data frame has the required format and passes it on.

SYNOPSIS

3461 splinesurv.data.frame <- function(x, ...)

INPUTS

    x  a data frame with columns i, j, time, delta, followed by covariates

SOURCE

3464 {
3465     call <- match.call()
3466     if(dim(x)[2] > 4 && all(colnames(x)[1:4] == c("i", "j", "time", "delta"))) {
3467         x <- x[order(x$i), ]
3468         out <- splinesurv.agdata(x, ...)
3469         out$call <- call
3470         return(out)
3471     } else {
3472         stop("input data frame needs to have colnames i, j, time, delta")
3473     }
3474 }