knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of meantables is to quickly make tables of descriptive statistics (i.e., counts, means, confidence intervals) for continuous variables. This package is designed to work in a Tidyverse pipeline, and consideration has been given to get results from R to 'Microsoft Word' ® with minimal pain.
You can install the released version of meantables from CRAN with:
install.packages("meantables")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("brad-cannell/meantables")
library(dplyr) library(meantables)
data("mtcars")
mtcars %>% mean_table(mpg)
mtcars %>% mean_table(mpg) %>% mean_format( recipe = "mean (lcl - ucl)", name = "mean_95", digits = 1 ) %>% select(response_var, mean_95)
mtcars %>% group_by(cyl) %>% mean_table(mpg) %>% mean_format("mean (sd)") %>% select(response_var:group_cat, formatted_stats)
mtcars %>% group_by(cyl) %>% mean_table(mpg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.