knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
summariser
provides simple functions for calculating the most common summary statistics, particularly confidence intervals.
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")
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.