Description Usage Arguments Details Examples
View source: R/lipidome_comparison_hypothesis_testing.R
'p_values_by_column' takes a data frame and a grouping vector and returns a data frame with the p-values of a given method.
1 2 3 4 5 6 7 | one_sample_test_by_col(
input_df,
group_vector,
alternative = "two.sided",
method = t.test,
confidence_level = 0.95
)
|
input_df |
data frame. Contains at least one numeric variable. |
group_vector |
vector. Vector containing the groups to be compared. group_vector = input_df$group (or other vector of length nrow(input_df)) |
alternative |
string. Specifies the alternative hypothesis. c("two.sided" (default), "greater", "less") |
method |
function. Options: t.test (default), wilcox.test |
confidence_level |
numeric. Confidence level of the interval. Default = 0.95 |
This function takes a data frame ans a grouping vector and performs a given hypothesis test on all numeric variables. The results are returned in a new data frame.
1 2 3 | my_iris <- subset(x = iris, Species == "setosa" | Species == "versicolor")
one_sample_test_by_col(my_iris, my_iris$Species)
one_sample_test_by_col(my_iris, my_iris$Species, method = wilcox.test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.