Description Usage Arguments Details Author(s) Examples
Find which corresponding age category in the guidelines are the patients in the LabBase2 database.
1 | AgeCatModify(inf.data)
|
inf.data |
Infected patient data. |
Find which corresponding age category in the guidelines are the patients in the LabBase2 database. The age categories different in guidelines and databases so need to regroup and relabel.
7001: 48 hours old; 7002-7003: 48 hours - 1 month old; 7004-7007 and 1-18: 1 month - 18 years old; 19-200: Over 18 years old
N Green
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ##---- 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 (inf.data)
{
patient.age_cat <<- cut(inf.data[, "hes_ageatstartofepisode"],
breaks = c(0, 18, 200, 7001.5, 7003.5, 7008))
patient.age_cat <- factor(patient.age_cat, c("(200,7002]",
"(7002,7004]", "(7004,7008]", "(0,18]", "(18,200]"))
patient.age_cat[patient.age_cat == "(0,18]"] <- "(7004,7008]"
patient.age_cat <- droplevels(patient.age_cat)
levels(patient.age_cat) <- 1:4
patient.age_cat
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.