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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.