Coerce Object to survDistr
as_survDistr.RdS3 generic to coerce supported objects into a survDistr object.
Usage
as_survDistr(x, ...)
# S3 method for class 'matrix'
as_survDistr(
x,
times = NULL,
method = "const_surv",
check = TRUE,
trim_dups = FALSE,
...
)
# S3 method for class 'survDistr'
as_survDistr(x, ...)
# Default S3 method
as_survDistr(x, ...)Arguments
- x
Object to convert.
- ...
Additional arguments passed to methods.
- times
(
numeric) Numeric vector of time points corresponding to columns ofx. IfNULL, column names ofxare used.- method
(
character(1))
Interpolation method passed to survDistr constructor.- check
(
logical(1))
Whether to validatexandtimes.- trim_dups
(
logical(1))
Whether to remove duplicate S(t) values and corresponding time points.
Value
A survDistr object.