powered by
A tidier version of t.test for two sample tests
t_test(data, formula, alternative = "two_sided", ...)
a data frame that can be coerced into a tibble
tibble
a formula with the response variable on the left and the explanatory on the right
character string specifying the direction of the alternative hypothesis. Options are "two_sided" (default), "greater", or "less".
two_sided
greater
less
currently ignored
# NOT RUN { # t test for comparing mpg against automatic/manual mtcars %>% dplyr::mutate(am = factor(am)) %>% t_test(mpg ~ am, alternative = "less") # }
Run the code above in your browser using DataLab