prepSurvivalLabels: Prep survival information (labels for all classifictation...

Description Usage Arguments Value Examples

Description

Prep survival information (labels for all classifictation tasks) to events.

Usage

1

Arguments

data

dataframe, rows are clinical visits to be classified, columns are features including clinical visits ids and at least the following columns:

  • eventID num, event id

  • survival num, days since baseline

  • status char, patient status at the end of data collection, 'DECEASED' or 'ALIVE'

Value

data dataframe, rows are clinical visits to be classified, columns are features including clinical visits ids and the following added columns:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data("fake_data")
t <- 'rate'
fake_tumorInfo <- fake_data$events # save tumor location and laterility strings before event cleaning
fake_demo <- fake_data$demo

fake_data$events <- cleanData(fake_data$events, tType = t)

# collect patient info for each event
# note that only eventName, iois, and eventID columns are used for SPM
fake_data <- merge(fake_data$events, fake_data$person, by='iois', all.x=T)
fake_data <- prepDemographics(fake_data, fake_demo) # prep for each event, since age does change
fake_data <- prepSurvivalLabels(fake_data) # get survival labels, these also change

novasmedley/gbmSpm documentation built on May 17, 2019, 10:39 a.m.