Description Usage Arguments Author(s) Examples
A helper function to provide full summaries/tables of a data frame, summarises mean, median and quantiles for numerical/date vectors and tables for character/categorical vectors. To be prettified.
1 | full_summary(data, useNA = "always", table_max_cat = 5)
|
data |
Your data frame. |
useNA |
whether to include NA values in the tables, defaults to "always". Use "no" to hide NA's and "ifany" to show only if there are any. |
table_max_cat |
Defines how large tables (dimensions) are shown, defaults to max 5 categories. For vectors with more than given categories shows number of unique values and number of missing records. |
Tommi Karki
1 2 3 4 5 6 7 8 9 10 11 12 13 | mydat <- data.frame(ID = c(seq(1,10,1)),
Gender = c(rep(c("F", "M"),5)),
AgeGroup = c(rep(c("0-18", "18-65", "65+"),3), "65+"),
Case = c(1,1,1,0,0,1,1,1,1,1),
DateOfOnset = as.Date(c("2017-06-11", "2017-06-11",
"2017-06-11", NA, NA, "2017-06-10",
"2017-06-14", "2017-06-14",
"2017-06-19", "2017-06-19")),
Month = c(sample(c(3:6),5, replace = TRUE), sample(c(1:12),5)),
Week = c(sample(c(10:12),5, replace = TRUE), sample(c(1:53),5)))
# Summaries/tables of all variables
full_summary(mydat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.