knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

summariser

Build Status codecov

summariser provides simple functions for calculating the most common summary statistics, particularly confidence intervals.

Installation

You can install the released version of summariser from CRAN with:

install.packages("summariser")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("condwanaland/summariser")

Using summariser

summariser is designed to fit into the tidyverse 'piping' style. Just pass a dataframe, and your measurement variable of interest into summary_stats.

library(summariser)
library(dplyr)
iris %>% 
  summary_stats(Sepal.Length)

If you want to group your dataframe by categorical factors, simply use dplyrs group_by before piping to summary_stats

iris %>%
  group_by(Species) %>% 
  summary_stats(Sepal.Length)

By default, summariser uses a normal distribution to calculate confidence intervals. If you would rather use a t distribution, just pass this to the type parameter.

iris %>%
  group_by(Species) %>% 
  summary_stats(Sepal.Length, type = "t")


condwanaland/summariser documentation built on Sept. 4, 2021, 3:44 a.m.