mo_std_table | R Documentation |
Produce the monthly wide-format table for CCGs. Takes long format data for CCGs and turns it wide with 13 months as variables. Hard coded to operate on dataframe 'ccg_dat_all', it filters the data to a given collection, e.g. "MRSA" or "E. coli" as exported in the HCAI DCS line lists.
mo_std_table(data_fm, collection, column)
data_fm |
The data frame on which to work, either ccg_dat_all or trust_dat_all |
collection |
A text string giving the data collection |
column |
A column which will be transposed |
A wide data.frame with counts of cases per month in columns with CCGs as rows
library(dplyr)
data(monthly_ccg_data_raw)
ccg_dat_all <- monthly_ccg_data_raw %>%
rename(org_code = ccg_code)
out_dat <- mo_std_table(data_fm = ccg_dat_all, collection = "MRSA",
column = "total_cases")
head(out_dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.