my_t.test: a one sample t-test in R

Description Usage Arguments Value Examples

View source: R/my_t.test.R

Description

This function cauculated for a one sample t-test.

Usage

1
my_t.test(x, alternative, mu)

Arguments

x

a numeric vector of data.

alternative

a character string specifying the alternative hypothesis. This should only accept two.sided, less, or greater. Otherwise, your function should throw an informative error.

mu

An integer representing the number of neighbors.

Value

A list with elements : test_stat:the numeric test statistic df:the degrees of freedom alternative:the value of the parameter alternative p_val:the numeric p-value

Examples

1
my_t.test(my_gapminder$lifeExp, alternative = "two.sided", mu = 60)

YZhien/final documentation built on Dec. 18, 2021, 7:23 p.m.