my_t_test: T-test Function

Description Usage Arguments Value Examples

View source: R/my_t_test.R

Description

This function performs a t-test on a data vector.

Usage

1
my_t_test(x, alternative, mu)

Arguments

x

Data vector on which t-test is performed.

alternative

A String (less, greater, or two.sided), against which the null-hypothesis will be compared.

mu

A numeric value representing the null hypothesis for the t-test.

Value

List containing the numeric test statistic, numeric degrees of freedom, string representing the type of t-test performed, and the numeric p-value.

Examples

1
2
my_t_test(my_gapminder$lifeExp, "greater", 60)
my_t_test(my_gapminder$lifeExp, "two.sided", 60)

oliverlinehan41/project3package documentation built on Dec. 22, 2021, 4:21 a.m.