Description Usage Arguments Value Author(s) See Also Examples
Generate frequency tables for TB cohort data from Koch 6 which has been cleaned, and subsetted into a drug-spectific data frame.
1 | drug_tabler(x, year = NULL, month = NULL)
|
x |
dataframe of combined and cleaned admission and change data from Koch 6 |
year |
numerical 4 digit value representing year of interest - optional |
month |
numerical 2 digit value representing month of interest - optional |
list containg both a 3x2 frequency table with total row - subsetted by year and month if defined, and a formatted version for display in Rmd files
Jay Achar
1 2 3 4 5 6 7 8 9 10 11 | x <- structure(list(id = 1:10, Starttre = structure(c(17211, 17634,
17738, 17683, 16899, 16598, 17201, 16587, 16587, 16601), class = "Date"),
Age = structure(c(1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L),
.Label = c("<= 18 years",
">18 years"), class = "factor")),
row.names = c(NA, -10L),
class = c("tbl_df",
"tbl", "data.frame"))
drug_tabler(x)
drug_tabler(x, year = 2018)
drug_tabler(x, year = 2015, month = 06)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.