knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
Generate descriptive statistics
# Install release version from CRAN install.packages("descriptr") # Install development version from GitHub # install.packages("devtools") devtools::install_github("rsquaredacademy/descriptr") # Install the development version from `rsquaredacademy` universe install.packages("descriptr", repos = "https://rsquaredacademy.r-universe.dev")
We will use a modified version of the mtcars
data set in the below examples.
The only difference between the data sets is related to the variable types.
library(descriptr)
str(mtcarz)
ds_summary_stats(mtcarz, mpg)
ds_freq_table(mtcarz, mpg)
ds_freq_table(mtcarz, cyl)
ds_cross_table(mtcarz, cyl, gear)
ds_group_summary(mtcarz, cyl, mpg)
ds_tidy_stats(mtcarz, mpg, disp, hp)
If you encounter a bug, please file a minimal reproducible example using reprex on github. For questions and clarifications, use StackOverflow.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.