Description Usage Arguments Value Examples
This function runs a t test on a vector of numbers.
1 | my_t.test(x, alternative, mu)
|
x |
Numeric vector input of data to be subjected to a t test by |
alternative |
Character string input specifying the alternative hypothesis for
|
mu |
Numeric input indicating the null hypothesis of the mean that |
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.
1 2 3 4 5 6 7 8 9 | x <- as.vector(subset(data.frame(my_gapminder), select = c("lifeExp")))
alternative <- c("two.sided", "less", "greater")
mu <- 60
my_t.test(x, alternative = "two.sided", mu)
my_t.test(x, alternative = "less", mu)
my_t.test(x, alternative = "greater", mu)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.