knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
options(tibble.print_min = 4L, tibble.print_max = 4L)

We'll start by loading dplyr:

library(tabulate)

tabulate()

The most important function of this package is tabulate(): it takes a dataframe and calculates the frequencies or mean of columns. The results can be grouped by any other column and also calculated with another subsample.

tabulate(data = iris,cols = Species)
tabulate(data = iris,cols = Sepal.Length,groups = Species ,return_mean = TRUE)


markitr/tabulate documentation built on Dec. 21, 2021, 2:47 p.m.