Description Usage Arguments Details Value Examples
Get the tumor location and laterality.
1 | getTumorLocation(data, tumorInfo)
|
data |
dataframe, rows are clinical visits to be classified, columns are features including clinical visits ids and at least the following columns:
|
tumorInfo |
a dataframe of pre-cleaned events and searches for tumor location |
Takes the first event with tumor location information in tumorInfo
and
convert location into dummy variables for logit since one person can have multiple locations.
tumorInfo
contains pre-cleaned data (cleanData
is used for cleaning events for SPM) agent_details
.
Also retrieves tumor lateriality.
Assumes location and laterility is in agent_details
column.
Assumes location is after "Location :" in string.
Assumes location and lateriality is unchanged for the remaining events (is static)
data
with additional columns containing tumor location dummy variables and tumor laterality
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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
fake_data <- getTumorLocation(fake_data, fake_tumorInfo) # get first tumor location
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.