unSurvDF: Converts Surv objects in a dataframe to "lo" and "hi" values

View source: R/unSurv.R

unSurvDFR Documentation

Converts Surv objects in a dataframe to "lo" and "hi" values

Description

Converts Surv objects in a dataframe to "lo" (i.e., lower) and "hi" (i.e., upper) values. The user can specify their own values or use the defaults.

Usage

unSurvDF(df, suf_lo = "_lo", suf_hi = "_hi")

Arguments

df

dataframe with Surv objects

suf_lo

Column name suffix for "lo" values. Default = "_lo"

suf_hi

Column name suffix for "hi" values. Default = "_hi"

Value

Returns dataframe with censored data converted to lo/hi format

See Also

makeSurvDF, unSurv , impute, imputeDF, saveDF,

Examples

df <- dataCensored[dataCensored$station=="CB3.3C", ][1:20,]
colnames(df)
# Default values
df2 <- unSurvDF(df)
colnames(df2)
# User values
df3 <- unSurvDF(df, "_LOW", "_HIGH")
colnames(df3)


leppott/baytrends documentation built on Nov. 2, 2024, 6:42 p.m.