my_t.test: T-test function

Description Usage Arguments Value Examples

View source: R/my_t.test.R

Description

This function performs a sample t-test based on the given input.

Usage

1
my_t.test(x, alternative, mu)

Arguments

x

A numeric set of data.

alternative

A character string specifying the t-test type for x.

mu

A number indicating the null hypothesis value of the mean.

Value

A list containing the test statistic, degree of freedom, a string represent the type of t-test, and the p-value of the t-test.

Examples

1
2
3
my_t.test(my_gapminder[[4]], "less", 1)
my_t.test(my_gapminder[[4]], "greater", 1)
my_t.test(my_gapminder[[4]], "two.sided", 1)

Zhaoyu-Andrew/Rpackage documentation built on March 19, 2020, 4:55 p.m.