R/as.data.frame.survTP.R

Defines functions as.data.frame.survTP

Documented in as.data.frame.survTP

as.data.frame.survTP <- function(x, ..., package="TPmsm") {
	if ( missing(x) ) {stop("Argument 'x' is missing, with no default");}
	if ( !is.survTP(x) ) {stop("Argument 'x' must be of class 'survTP'");}
	package <- match.arg(arg=package, choices=c("TPmsm", "p3state.msm", "etm"), several.ok=FALSE);
	func <- switch(package, "TPmsm"=OutTPmsm, "p3state.msm"=Outp3state, "etm"=Outetm);
	return( func(x[[1]], 1:4) );
} # as.data.frame.survTP

Try the TPmsm package in your browser

Any scripts or data that you put into this service are public.

TPmsm documentation built on Jan. 14, 2023, 1:17 a.m.