View source: R/lookup_limits.R
lookup_limits | R Documentation |
Reference limits are specific for age and sex. Each laboratory institute has its own reference limits. This function is useful to query a dataset against this database.
lookup_limits(age, sex, table)
age |
|
sex |
|
table |
|
matrix
, with 2 columns ("lower", "upper") and as many rows as
length(age)
.
Sebastian Gibb
reference <- data.frame( param = c("albumin", rep("bilirubin", 4)), age = c(0, 1, 2, 3, 7), # days sex = "both", units = c("g/l", rep("µmol/l", 4)), # ignored lower = c(35, rep(NA, 4)), # no real reference values upper = c(52, 5, 8, 13, 18) # no real reference values ) # lookup albumin reference values for 18 year old woman lookup_limits( age = 18 * 365.25, sex = "female", table = reference[reference$param == "albumin",] ) # lookup albumin and bilirubin values for 18 year old woman lookup_limits( age = 18 * 365.25, sex = "female", table = reference ) # lookup bilirubin referenc values for infants lookup_limits( age = 0:8, sex = rep(c("female", "male"), 5:4), table = reference[reference$param == "bilirubin",] )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.