Description Usage Arguments Author(s) See Also Examples
View source: R/splitFillCatFns.R
Deprecated by the more general splitByGroup
.
1 | splitByOrg(total.data, survData.all)
|
total.data |
The complete combined raw data. |
survData.all |
The complete survival data format array with multiple same-patient in-hospital infection records removed. |
N Green
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (total.data, survData.all)
{
survDataByGroup <- list()
namesGroup <- unique(total.data$lab_group[!is.na(total.data$lab_group)])
for (name in namesGroup) {
groupRows <- total.data$lab_group %in% c(name, NA)
uniqueGroupRows <- rmOrganism(total.data[groupRows, ])
survDataByGroup[[name]] <- survData.all[groupRows, ][uniqueGroupRows,
]
}
gram <- c(-1, 1)
for (i in seq_along(gram)) {
groupRows <- total.data$Gram %in% c(gram[i], NA)
uniqueGroupRows <- rmOrganism(total.data[groupRows, ])
survDataByGroup[[as.character(gram[i])]] <- survData.all[groupRows,
][uniqueGroupRows, ]
}
survDataByGroup
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.