powered by
Function creates a contrast matrix for all pairwise comparisons
apc(ngroups, labs = NULL)
The function returns a matrix of all pairwise contrasts.
A positive integer greater than 1 denoting the number of groups
A vector of groups labels with length equal to ngroups. The default is set to NULL, and if used, the labels will be set to 1:length(ngroups).
ngroups
NULL
1:length(ngroups)
### A contrast matrix based on all pairwise contrasts of 5 groups apc(5) ### Adding group labels apc(5, labs = paste("Group", 1:5, sep = " "))
Run the code above in your browser using DataLab