Description Usage Arguments Details Examples
Remove clinical visits with no history of length maxgap
.
1 | removeVisits(data, maxgap, maxlength, tType, save = TRUE, outDir)
|
data |
dataframe, see Details |
tType |
char, tumor volume type nickname, see |
save |
bool, save removed data? |
outDir |
char, full path to output directory |
clinical visits that do not have a history of maxgap time cannot be evaluated (such vists would have indeterminate values for temporal patterns item1 –> item2 when the maxgap exisits between these items) e.g., at the first observed visit for a patient, I search for item2's existence, and then look backwards in time to see if item1 happend within the maxgap. I wouldn't be able to determien this pattern's value because no visits are before the first visit. Therefore, such clinical visits should be removed.
data
dataframe,
rows are clinical visits to be classified,
columns are features including clinical visits ids
and at least the following columns:
id
char, clinical visit id in the format "patientID.eventID"
iois
char, patient id
eventID
char, event id
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data("features_ratechange_sup0.4g60l2z2") # features and labels for each clinical visit
maxgap <- 60 # constants used to create features
maxlen <- 2
t <- 'rate'
# format
names <- colnames(feats)
feats <- data.frame(id=row.names(feats),feats)
colnames(feats) <- c('id',names)
cat('...overall samples: ', nrow(feats), '\n')
feats <- prepLaterality(feats)
feats <- prepLocation(feats)
cat('...removing clinical visits with no history of length maxgap:', maxgap, '\n')
feats <- removeVisits(feats,
maxgap=maxgap,
maxlength=maxlen,
tType=t,
save=F,
outDir=NA)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.