summarytools

R Package to Quickly and Neatly Summarize Data

https://github.com/dcomtois/summarytools

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 16 committers (6.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.3%) to scientific vocabulary

Keywords

descriptive-statistics frequency-table html-report markdown pander pandoc pandoc-markdown r rmarkdown rstats rstudio
Last synced: 6 months ago · JSON representation

Repository

R Package to Quickly and Neatly Summarize Data

Basic Info
  • Host: GitHub
  • Owner: dcomtois
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 37.8 MB
Statistics
  • Stars: 540
  • Watchers: 20
  • Forks: 81
  • Open Issues: 30
  • Releases: 0
Topics
descriptive-statistics frequency-table html-report markdown pander pandoc pandoc-markdown r rmarkdown rstats rstudio
Created about 11 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog

README.Rmd

---
output: 
  github_document
always_allow_html: true
---


[![CRAN status](https://www.r-pkg.org/badges/version/summarytools)](https://CRAN.R-project.org/package=summarytools)
[![](https://cranlogs.r-pkg.org/badges/summarytools)](http://cran.rstudio.com/web/packages/summarytools/index.html)
[![](https://cranlogs.r-pkg.org/badges/grand-total/summarytools)](http://cran.rstudio.com/web/packages/summarytools/index.html)
PayPal donate button

⁠

```{r knitr-setup, include=FALSE}
library(knitr)
opts_chunk$set(echo = TRUE, results = 'asis', class.output = "small")
library(summarytools)
st_options(plain.ascii = FALSE,
           style = "rmarkdown",
           footnote = NA,
           subtitle.emphasis = FALSE,
           dfSummary.silent = TRUE,
           dfSummary.style = "grid",
           descr.silent = TRUE)
library(kableExtra)
```

# Summarytools 1.1 is out! 

Check out what's new.

Love **summarytools**? Share the love, [buy me a coffee!](https://buymeacoffee.com/dcomtois)



![](img/collage.png)

**summarytools** is a an [*R*](https://www.r-project.org) package for data
cleaning, exploring, and simple reporting. The package was developed with the
following objectives in mind:

-   Provide a coherent set of easy-to-use descriptive functions akin to
    those included in commercial statistical software suites such
    as SAS, SPSS, and Stata 
 - Offer flexibility in terms of output format & content  
 - Integrate well with commonly used software & tools for reporting
   (the [RStudio](https://posit.co/products/open-source/rstudio/) IDE,
   [Rmarkdown](https://rmarkdown.rstudio.com/),
   [Quarto](https://quarto.org/docs/get-started/), and 
    [knitr](https://yihui.org/knitr/)) while also allowing for standalone,
    simple report generation using any R interface

On a more personal level, I simply wish to share with the R community and the
scientific community at large the functions I first developed for myself, but
realized would benefit others who are facing similar challenges when 
dealing daily with (often messy) data.

# Package Documentation

The bulk of the technical documentation can now be found in the following
vignettes:

[**Introduction to summarytools**](https://htmlpreview.github.io/?https://github.com/dcomtois/summarytools/blob/master/doc/introduction.html)  |  [CRAN version](https://cran.r-project.org/package=summarytools/vignettes/introduction.html)  
[**Summarytools in R Markdown**](https://htmlpreview.github.io/?https://github.com/dcomtois/summarytools/blob/master/doc/rmarkdown.html)  |  [CRAN Version](https://cran.r-project.org/packages=summarytools/vignettes/rmarkdown.html)  
[**PDF Manual**](https://cran.r-project.org/web/packages/summarytools/summarytools.pdf) (automatically generated by CRAN)

# Installing summarytools

### Required Software

Additional software is used by **summarytools** for fine-tuning graphics as well
as offering interactive functionality. If you are installing **summarytools**
for the first time, click on the relevant link to get OS-specific instructions.
On Windows, no additional software is required.

Mac OS X  
Ubuntu / Debian / Mint  
Older Ubuntu (14 and 16)  
Fedora / Red Hat / CentOS  
Solaris

### Installing From GitHub

This method has the advantage of benefiting from minor fixes and improvements
that are added between CRAN releases. Its main drawback is that you won't be
noticed when a new version is available. You can either check this page from
time to time, or best, use a package that checks for package updates on various
repositories, such as [dtupdate](https://github.com/hrbrmstr/dtupdate) and
[Drat](https://dirk.eddelbuettel.com/code/drat.html).

```{r, eval=FALSE}
install.packages("remotes")        # Using devtools or pak is also possible
library(remotes)
install_github("rapporter/pander") # Strongly recommended
install_github("dcomtois/summarytools", build_vignettes = TRUE)
```

### Installing From CRAN

CRAN versions are stable but are not updated as often as the GitHub versions. On
the plus side, they can be easier to install on some systems.

```{r, eval=FALSE}
install.packages("summarytools")
```

# Latest Changes

- Version 1.1.0 introduced a few significant improvements, aside from the bug
  fixes.

  - In `stby()`, the `useNA` parameter can be used to generate additional
    groupings for observations where the grouping variable(s) are `NA`
  - Labelled vectors from **haven** & **labelled** are treated like factors
    by `freq()` (always) and `dfSummary()` (only when all values have labels;
    this is to avoid generating factors with countless numerical levels).
  - `descr()` is more flexible with the stats parameters; you can for instance 
    use `stats = c("all", -"kurtosis")` if you need everything except kurtosis
  - The helper function `zap_attr()` turns results into simple matrices,
    adding an alternative to `tb()` when you need to work further with the
    results
  - A new `na.val` parameter was added to `freq()`, `ctable()` and
    `dfSummary()`, which allows treating a particular character value or
    factor level as `NA`. One common instance would be "" (empty string) for
    character vectors.
  - Sampling weights were a bit buggy with by-groups, and so was `tb()` with
    `freq()` results. This is now a thing of the past. 
  - See the package's NEWS for more details: `news(package="summarytools")`
  
- In `dfSummary()` since 1.0.1:

    -   It is possible to control which statistics to show in the *Freqs /
        Values* column (see `help("st_options", "summarytools")` for examples)  
    -   In *html* outputs, tables are better aligned horizontally
        (categories \>\> counts \>\> charts); if misalignment occurs, adjusting
        `graph.magnif` should resolve it
    -   List-type columns and `Inf` values are handled properly

For more details, see `vignette("introduction", "summarytools")` as well as
`news(package = "summarytools")`.

# Additional Software Installations

### Required Software on Mac OS

- [**XQuartz**](https://www.xquartz.org/)
- [**Magick++**](https://imagemagick.org/Magick++/) 

Magick++ can be installed using 
[Homebrew](https://formulae.brew.sh/formula/imagemagick) or 
[Macports](https://ports.macports.org/port/ImageMagick/).

Back to installation instructions

### Required Software for Debian / Ubuntu / Linux Mint

[**Magick++**](https://imagemagick.org/Magick++/)  
`sudo apt install libmagick++-dev`

Back to installation instructions

### Required Software for Older Ubuntu Versions

This applies only if you are using Ubuntu Trusty (14.04) or Xenial (16.04).

[**Magick++**](https://imagemagick.org/Magick++/)

    sudo add-apt-repository -y ppa:opencpu/imagemagick
    sudo apt-get update
    sudo apt-get install -y libmagick++-dev

Back to installation instructions

### Required Software for Fedora / Red Had / CentOS

[**Magick++**](https://imagemagick.org/Magick++/)  
`sudo yum install ImageMagick-c++-devel`

Back to installation instructions

### Required Software for Solaris

[**Magick++**](https://imagemagick.org/Magick++/)

    pkgadd -d http://get.opencsw.org/now
    /opt/csw/bin/pkgutil -U
    /opt/csw/bin/pkgutil -y -i imagemagick 
    /usr/sbin/pkgchk -L CSWimagemagick

Back to installation instructions

# Support *summarytools*' Development

If **summarytools** brings value to your work, please consider making a
donation. It will bring a smile to my face and boost my productivity! [Buy me a coffee](https://buymeacoffee.com/dcomtois),
or use the [PayPal link]("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=HMN3QJR7UMT7S&item_name=Help+scientists,+data+scientists+and+analysts+around+the+globe¤cy_code=CAD&source=url"). Thanks!



### Supporters
A big thanks to the following people who made donations:

-   Ashirwad Barnwal  
-   David Thomas  
-   Peter Nilsson  
-   Ross Dunne  
-   Igor Rubets  
-   Joerg Sahlmann
-   Mark Friedman
-   Roger Hilfiker
-   Stefano Lav

The package comes with no guarantees. It is a work in progress and feedback is
always welcome. Please open an [issue on
GitHub](https://github.com/dcomtois/summarytools/issues) if you find a bug or
wish to submit a feature request.

Back to top

Owner

  • Name: Dominic Comtois
  • Login: dcomtois
  • Kind: user
  • Location: Montréal, Québec, Canada
  • Company: Statconseil

Statistical consultant, SAS & R developer.

GitHub Events

Total
  • Issues event: 25
  • Watch event: 18
  • Issue comment event: 43
  • Push event: 59
  • Fork event: 4
Last Year
  • Issues event: 25
  • Watch event: 18
  • Issue comment event: 43
  • Push event: 59
  • Fork event: 4

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 1,489
  • Total Committers: 16
  • Avg Commits per committer: 93.063
  • Development Distribution Score (DDS): 0.019
Past Year
  • Commits: 97
  • Committers: 1
  • Avg Commits per committer: 97.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Dominic Comtois d****s@g****m 1,461
iago-pssjd 4****d@u****m 6
IAGO GINÉ VÁZQUEZ i****e@s****s 4
Max Kovalenkov m****v@h****m 3
Iago i****o@d****e 2
Iago Giné-Vázquez i****o@t****m 2
Mickaël Canouil 8****l@u****m 2
Bruna b****w@g****m 1
Cameron Patrick c****k@u****u 1
Comtois D****s@s****a 1
Emrah Er e****r@e****m 1
Favio André Vázquez f****p@g****m 1
Jon Calder j****r@g****m 1
Paul Feitsma p****a@M****l 1
Rprrr k****a@g****m 1
kevinkuo k****o@k****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 110
  • Total pull requests: 10
  • Average time to close issues: 9 months
  • Average time to close pull requests: 3 months
  • Total issue authors: 97
  • Total pull request authors: 4
  • Average comments per issue: 3.47
  • Average comments per pull request: 1.4
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 9
  • Pull requests: 0
  • Average time to close issues: 2 days
  • Average time to close pull requests: N/A
  • Issue authors: 8
  • Pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • astraetech (3)
  • Payamdel (3)
  • statzhero (3)
  • iago-pssjd (3)
  • SimpleAddress4390 (3)
  • jarbet (2)
  • GegznaV (2)
  • hedsnz (2)
  • stefanocoretta (1)
  • SugarRayLua (1)
  • Jiefei-Wang (1)
  • g-arruda (1)
  • ScaonE (1)
  • greg-botwin (1)
  • realbigi (1)
Pull Request Authors
  • iago-pssjd (6)
  • mcanouil (2)
  • cmrnp (1)
  • Rprrr (1)
Top Labels
Issue Labels
help wanted (16) enhancement (14) Ready to be tested (3) good first issue (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 15,850 last-month
  • Total docker downloads: 45,495
  • Total dependent packages: 9
    (may contain duplicates)
  • Total dependent repositories: 20
    (may contain duplicates)
  • Total versions: 40
  • Total maintainers: 1
cran.r-project.org: summarytools

Tools to Quickly and Neatly Summarize Data

  • Versions: 30
  • Dependent Packages: 8
  • Dependent Repositories: 18
  • Downloads: 15,850 Last month
  • Docker Downloads: 45,495
Rankings
Stargazers count: 0.8%
Forks count: 0.9%
Downloads: 3.2%
Dependent repos count: 6.7%
Average: 6.9%
Dependent packages count: 7.3%
Docker downloads count: 22.5%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: r-summarytools
  • Versions: 10
  • Dependent Packages: 1
  • Dependent Repositories: 2
Rankings
Stargazers count: 17.9%
Dependent repos count: 20.2%
Forks count: 21.6%
Average: 22.2%
Dependent packages count: 29.0%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • base64enc * imports
  • checkmate * imports
  • dplyr * imports
  • grDevices * imports
  • htmltools * imports
  • lubridate * imports
  • magick * imports
  • matrixStats * imports
  • methods * imports
  • pander * imports
  • pryr * imports
  • rapportools * imports
  • stats * imports
  • tcltk * imports
  • tibble * imports
  • tidyr * imports
  • utils * imports
  • forcats * suggests
  • formatR * suggests
  • kableExtra * suggests
  • knitr * suggests
  • magrittr * suggests
  • rmarkdown * suggests
  • rstudioapi * suggests
.github/workflows/check-standard.yaml actions
  • actions/checkout v2 composite
  • maxim-lobanov/setup-xcode v1 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite