# NOT RUN {
data("exams")
# All stats for all numerical variabls
descr(exams)
# Only common statistics
descr(exams, stats = "common")
# Arbitrary selection of statistics, transposed
descr(exams, stats = c("mean", "sd", "min", "max"), transpose = TRUE)
# Rmarkdown-ready
descr(exams, plain.ascii = FALSE, style = "rmarkdown")
# Grouped statistics
data("tobacco")
with(tobacco, stby(BMI, gender, descr))
# Grouped statistics, transposed
with(tobacco, stby(BMI, age.gr, descr, stats = "common", transpose = TRUE))
# }
# NOT RUN {
# Show in Viewer (or browser if not in RStudio)
view(descr(exams))
# Save to html file with title
print(descr(exams),
file = "descr_exams.html",
report.title = "BMI by Age Group",
footnote = "<b>Schoolyear:</b> 2018-2019<br/><b>Semester:</b> Fall")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab