convertStatus: convertStatus

Description Usage Arguments Value Author(s) Examples

View source: R/base_convertStatus.R

Description

convert time and status to a binary variable

Usage

1
2
convertStatus(data, time, status, event = "1", cutoff = c(365, 365 *
  2), names = c("Year_1", "Year_2"), filter = T)

Arguments

data

the data containing time and status columns

time

colname of time

status

colname of status

event

the symbol of event happening

cutoff

the cut off of time to create a binary variable

filter

if filter = T,then the sample that with less time and event not happening would be consider as NA,which means that we could not do a correct judge.

name

the colnames of new binary variables

Value

a data frame of binary variables

Author(s)

Weibin Huang<654751191@qq.com>

Examples

1
2
3
4
5
6
7
8
library(lucky)
data("rna.design")
df <- convertStatus(data = rna.design,
                    time = "OS.time",status = "OS.status",
                    event = "1",
                    cutoff = c(365,365*2),
                    names = c("Year_1","Year_2"))
View(df)

shijianasdf/BasicBioinformaticsAnalysisFromZhongShan documentation built on Jan. 3, 2020, 10:08 p.m.