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 of data to be tested.

alternative

Character string specifying the alternative hypothesis, must be "two.sided", "less", or "greater".

mu

Numeric input indicating the null hypothesis value of the mean.

Value

A list with the numeric test statistic, degree of freedom, alternative, and the numeric p-value.

Examples

1
2
my_t.test(1:10, alternative = "two.sided", mu = 5)
my_t.test(c(0, 0.5, -0.5, 0.2, 0), alternative = "less", mu = 0)

wanyeehing/project3package documentation built on Dec. 23, 2021, 5:07 p.m.