An open API service indexing awesome lists of open source software.

https://github.com/rsquaredacademy/descriptr

Generate descriptive statistics
https://github.com/rsquaredacademy/descriptr

descriptive-statistics eda rstats summary-statistics

Last synced: 6 months ago
JSON representation

Generate descriptive statistics

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

# descriptr

> Generate descriptive statistics

[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/descriptr)](https://cran.r-project.org/package=descriptr)
[![R-CMD-check](https://github.com/rsquaredacademy/descriptr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rsquaredacademy/descriptr/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/rsquaredacademy/descriptr/graph/badge.svg)](https://app.codecov.io/gh/rsquaredacademy/descriptr)

## Installation

```{r cran-installation, eval = FALSE}
# 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")
```

## Articles

- [Continuous Data](https://descriptr.rsquaredacademy.com/articles/continuous-data.html)
- [Categorical Data](https://descriptr.rsquaredacademy.com/articles/categorical-data.html)
- [Visualization](https://descriptr.rsquaredacademy.com/articles/visualization.html)

## Usage

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.

```{r load, eval=TRUE, echo=FALSE}
library(descriptr)
```

```{r egdata}
str(mtcarz)
```

### Continuous Data

#### Summary Statistics

```{r descript1}
ds_summary_stats(mtcarz, mpg)
```

#### Frequency Distribution

```{r descript4}
ds_freq_table(mtcarz, mpg)
```

### Categorical Data

#### One Way Table

```{r descript3}
ds_freq_table(mtcarz, cyl)
```

#### Two Way Table

```{r descript2}
ds_cross_table(mtcarz, cyl, gear)
```

### Group Summary

```{r descript5}
ds_group_summary(mtcarz, cyl, mpg)
```

#### Multiple Variable Statistics

```{r descriptr6}
ds_tidy_stats(mtcarz, mpg, disp, hp)
```

## Features

- Summary statistics
- Two way tables
- One way table
- Group wise summary
- Multiple variable statistics
- Multiple one way tables
- Multiple two way tables

## Getting Help

If you encounter a bug, please file a minimal reproducible example using
[reprex](https://reprex.tidyverse.org/index.html) on github. For questions and
clarifications, use [StackOverflow](https://stackoverflow.com/).