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 in R.

Usage

1
my_t.test(x, alternative, mu)

Arguments

x

Numeric vector of data.

alternative

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

mu

Number indicating the null hypothesis value of the mean.

Value

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

Examples

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

dhruvrc/STAT302Package documentation built on March 24, 2020, 5:36 p.m.