Summarise and Explore Continuous, Categorical and Date Variables

Explore continuous, date and categorical variables with summary statistics, visualisations, and frequency tables. Brings the ease and simplicity of the sum and tab commands from 'Stata' to 'R', including support for two-way cross-tabulations, hypothesis tests, duplicate and missing data exploration, and automated HTML or PDF exploratory reports.


sumvar

The sumvar package quickly explores continuous, date and categorical variables. sumvar brings the ease and simplicity of the sum and tab commands from Stata to R.

Installation

Install from CRAN:

install.packages("sumvar")

Or install the development version from GitHub:

# install.packages("pak")
pak::pak("alstockdale/sumvar")

Functions

  • dist_sum() — explore a continuous variable; stratify by a grouping variable with df %>% dist_sum(var, group).
  • dist_date() — summarise date variables; usage is the same as dist_sum().
  • tab1() — frequency table for a single categorical variable: df %>% tab1(var).
  • tab() — two-way cross-tabulation: df %>% tab(var1, var2).
  • dup() — explore duplicates and missing values across a single variable or an entire data frame.
  • explorer() — generate an HTML or PDF exploratory data analysis report for a whole data frame.

Both dist_sum() and tab() include options for frequentist hypothesis tests. See the function help pages for details.

All functions accept the %>% pipe from a tibble or data frame and return results as a tibble, so outputs can be saved and further manipulated:

summary <- df %>% dist_sum(var)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("sumvar")

0.2.0 by Alexander Stockdale, 7 months ago


https://github.com/alstockdale/sumvar, https://alstockdale.github.io/sumvar/


Report a bug at https://github.com/alstockdale/sumvar/issues


Browse source code at https://github.com/cran/sumvar


Authors: Alexander Stockdale [aut, cre, cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, dplyr, ggplot2, kableExtra, knitr, magrittr, patchwork, purrr, rlang, rmarkdown, scales, stats, tibble, tidyr, utils

Suggests testthat, tinytex


See at CRAN