my_t.test: My T-Test Function

Description Usage Arguments Value Examples

View source: R/my_t.test.R

Description

This function mimics R's t.test() function.

Usage

1
my_t.test(x, alternative, mu)

Arguments

x,

a numeric vector.

alternative,

specifying the alternative hypothesis

mu,

the null hypothesized mean.

Value

a table including the test statistic, degrees of freedom, the alternative type, and the p-value for the test.

Examples

1
2
my_t.test(rnorm(20, mean = 0, sd = 1), "two.sided", 1)
my_t.test(rnorm(20, mean = 0, sd = 1), "less", 3)

ElliotWinters/exwProject3 documentation built on Dec. 17, 2021, 6:26 p.m.