Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gvelasq/tidytab
Create tidyverse-friendly tables of frequencies
https://github.com/gvelasq/tidytab
exploratory-data-analysis r tidy-table
Last synced: 3 months ago
JSON representation
Create tidyverse-friendly tables of frequencies
- Host: GitHub
- URL: https://github.com/gvelasq/tidytab
- Owner: gvelasq
- License: other
- Created: 2018-01-28T23:57:07.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-04-28T07:17:17.000Z (10 months ago)
- Last Synced: 2024-04-28T08:49:50.780Z (10 months ago)
- Topics: exploratory-data-analysis, r, tidy-table
- Language: R
- Homepage: https://gvelasq.github.io/tidytab/
- Size: 635 KB
- Stars: 17
- Watchers: 3
- Forks: 3
- Open Issues: 10
-
Metadata Files:
- Readme: README.Rmd
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Support: .github/SUPPORT.md
Awesome Lists containing this project
README
---
output: github_document
---```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# tidytab
> Create tidyverse-friendly tables of frequencies
[![R-CMD-check](https://github.com/gvelasq/tidytab/actions/workflows/R-CMD-check.yaml/badge.svg?branch=main)](https://github.com/gvelasq/tidytab/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/gvelasq/tidytab/branch/main/graph/badge.svg)](https://codecov.io/gh/gvelasq/tidytab?branch=main)
[![CRAN status](https://www.r-pkg.org/badges/version/tidytab)](https://cran.r-project.org/package=tidytab)
[![R-universe status](https://gvelasq.r-universe.dev/badges/tidytab)](https://gvelasq.r-universe.dev/tidytab)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)## Installation
You can install tidytab from GitHub with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("gvelasq/tidytab")
```## Usage
```{r example, message = FALSE}
library(tidytab)# one-way table of frequencies
mtcars |> tab(cyl)# two-way table of frequencies (a special 2x2 contingency table)
mtcars |> tab(cyl, gear)# flat contingency tables of three (or more) variables
mtcars |> tab(cyl, gear, am)# tables wider than the R console are automatically wrapped
mtcars |> tab(cyl, gear, am, vs)# missing values are displayed in red
tab(letters[24:27])# ftab() displays only flat contingency tables (here, with two variables)
mtcars |> ftab(cyl, gear)# tab1() displays one-way tables for each variable
mtcars |> tab1(cyl, gear)# tab2() displays two-way tables for all variable combinations
mtcars |> tab2(cyl, gear, am)# ta() is a shortened alias for tab(), inspired by Stata
mtcars |> ta(gear)
```## Code of Conduct
Please note that the tidytab project is released with a [Contributor Code of Conduct](https://gvelasq.github.io/tidytab/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.