knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

tidyttest

The goal of tidyttest is to make a t-test function that:

Installation

You can install tidyttest from GitHub with:

# install.packages("devtools")
devtools::install_github("jrosen48/tidyttest")

Example

This is a basic example which shows you how to use the t_test() function:

library(dplyr)
library(tidyttest)

storms %>% 
    filter(status %in% c("tropical depression", "tropical storm")) %>% 
    mutate(category = as.integer(category)) %>% 
    t_test(category, status)

It outputs a tibble:

t_test_df <- storms %>% 
    filter(status %in% c("tropical depression", "tropical storm")) %>% 
    mutate(category = as.integer(category)) %>% 
    t_test(category, status)

t_test_df

You can also use it without a pipeline:

storms_ss <- storms %>% 
    filter(status %in% c("tropical depression", "tropical storm")) %>% 
    mutate(category = as.integer(category))

t_test_df <- t_test(storms_ss, category, status)
t_test_df


jrosen48/tidyttest documentation built on May 25, 2019, 6:25 p.m.