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.

Usage

1
my_t.test(x, alternative, mu)

Arguments

x

Numeric vector of data to be used in the t-test.

alternative

Character string indicating type of alternative hypothesis. Only accepts "two.sided", "less" or "greater".

mu

Numeric input indicating the value of the mean for the null hypothesis.

Value

Returns a list containing a numeric representing the t-test test statistic, an integer representing the degrees of freedom used, a string representation of the given alternative, and a numeric representing the resulting p-value.

Examples

1
2
my_t.test(c(1, 2, 3, 4, 5), "two.sided", 1)
my_t.test(c(1, 2, 3, 4, 5), "less", 1)

seangrimm/PROJECT3PACKAGE documentation built on March 22, 2021, 1:52 p.m.