View source: R/group_source_bacteraemia.R
group_source_bacteraemia | R Documentation |
Group the sources of bacteraemia for reporting in QEC or elsewhere. In 2017 the column which gave the primary focus for Gram-negative collections changed with the introducion new risk factor collection on the DCS.
group_source_bacteraemia(collection, source_col)
collection |
A string giving the data collection, one of "MRSA", "MSSA", "E. coli", "Klebsiella spp", "Pseudomonas aeruginosa" |
source_col |
The string giving the source of bacteraemia to be grouped |
Previously, the field name was risk_factors_most_likely_primary_focus the new field name is source_primary_focus_of_bacteraemia
The general approach when analysing the data is to combine the information from both fields into one. This may cause problems where there is contradictory information. New information is copied into old, but only when new information is not unknown or otherwise missing.
A vector of grouped sources
group_source_bacteraemia(collection = "E. coli", source_col = "Urinary tract")
## Not run:
dat <- data.frame(stringsAsFactors=FALSE,
org = c("E. coli", "MRSA"),
source = c("Unassessed", "Skin/Soft tissue infection")
)
dat$grouped_source <- group_source_bacteraemia(collection = dat$org, source_col = dat$source)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.