my_t_test: T-test function

Description Usage Arguments Value Examples

View source: R/my_t_test.R

Description

This function performs a one-sample t-test.

Usage

1
my_t_test(x, alternative, mu)

Arguments

x

numeric vector input of data.

alternative

a string that determinates the null hypothesis.

mu

numeric input of the null hypothesis mean.

Value

A list with the alternative hypothesis, numeric test value, and numeric p-value.

Examples

1
2
my_t_test(x = rnorm(10, 0, 1), alternative = "two.sided", mu = 0)
my_t_test(my_gapminder$pop, alternative = "less", mu = 0)

alishaluo/STAT302package documentation built on March 17, 2020, 4:37 a.m.