two_sample_test tests that y has the same mean within the two groups defined by x

two_sample_test(data, x, y, confint = 0.95, alternative = c("both", "less",
  "greater", "all"))

Arguments

data
a data frame
x
grouping variable; object of type factor
y
a numeric vector
confint
confidence level
alternative
a character string specifying the alternative hypothesis, must be one of "both" (default), "greater", "less" or "all". You can specify just the initial letter.

Value

two_sample_test returns an object of class "two_sample_test". An object of class "two_sample_test" is a list containing the following components:

Examples

two_sample_test(mtcars, 'am', 'mpg', alternative = 'less')
#> Error in data_split(data, x, y): could not find function "%>%"
two_sample_test(mtcars, 'am', 'mpg', alternative = 'greater')
#> Error in data_split(data, x, y): could not find function "%>%"
two_sample_test(mtcars, 'am', 'mpg', alternative = 'both')
#> Error in data_split(data, x, y): could not find function "%>%"
two_sample_test(mtcars, 'am', 'mpg', alternative = 'all')
#> Error in data_split(data, x, y): could not find function "%>%"