my_t.test: t-Test Function

Description Usage Arguments Value Examples

View source: R/my_t.test.R

Description

Performs one or two-sided t-tests on numerical data.

Usage

1
my_t.test(x, alternative = c("two-sided", "less", "greater"), mu)

Arguments

x

Vector of numeric data (with no NA values) that t-test will be performed on.

alternative

String input of either: "greater", "less", or "two-sided".

mu

Numeric value that represents the true mean of the input data, x.

Value

List containing the test statistic (numeric), degrees of freedom (numeric), initial input value of alternative, and the p-value (numeric).

Examples

1
2
3
set.seed(302)
x <- rnorm(100, mean = 0, sd = 1)
my_t.test(x = x, alternative = "less", mu = 0)

achew20/project3Package2021 documentation built on Dec. 18, 2021, 10:22 p.m.