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 containing the data that will be tested.

alternative

String input specifying the alternative hypothesis.

mu

Numeric input indicating the null hypothesis value of the mean.

Value

List containing a numeric test statistic, a numeric degrees of freedom, a string showing alternative, and a numeric p-value, all calculated from performing a t-test on x.

Examples

1
2
my_t.test(1:10, "two.sided", 5)
my_t.test(1:10, "less", 10)

qiguangyan/Project3 documentation built on Dec. 22, 2021, 10:55 a.m.