my_t.test: t test function

Description Usage Arguments Value Examples

View source: R/my_t.test.R

Description

This function can perform a one sample t test in R.

Usage

1
my_t.test(x, alternative, mu)

Arguments

x

a numeric vector of data.

alternative

a character string specifying the alternative hypothesis. This should only accept "two.sided", "less", or greater".

mu

a number indicating the null hypothesis value of the mean.

Value

A list with the numeric test statistic, the degrees of freedom, the value of the parameter alternative, the numeric p-value.

Examples

1
2
lifeExp <- my_gapminder$lifeExp
my_t.test(lifeExp, "two.sided", 60)

YuxinHuang0723/samplepackage documentation built on Dec. 18, 2021, 8:24 p.m.