Description Usage Arguments Value Examples
View source: R/pairwise_stats.R
pairwise_stats performs a provided function pairwise between all combinations of groups. The first two arguments of the function passed to pairwise_stats must accept vectors of values as inputs. These vectors should correspond to the values for group A and group B, respectively.
The function takes as input a data.frame or tibble, the column names of grouping variables, the column name for a variable of interest, and a function.
1 2 3 4 5 6 7 8 9 | pairwise_stats(
x,
group_cols,
var_cols,
fxn,
two_way = FALSE,
output_format = "v1",
...
)
|
x |
A data.frame or tibble. |
group_cols |
Vector of the names of the grouping columns. |
var_cols |
Vector of the names of the variables of interest. |
fxn |
The function to be applied. |
two_way |
Whether the order of data inputs to fxn matter. |
output_format |
The version of the output format (v0 or v1). |
... |
Extra arguments passed to fxn, i.e. alternative = "greater", etc. |
A tibble.
A pairwise_stats object with slots for the results, grouping variables, variable of interest, and any other parameters passed in, excluding the input data frame.
1 | pairwise_stats(iris, "Species", "Sepal.Length", t.test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.