Learn R Programming

baytrends (version 2.0.5)

unSurvDF: 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

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab