pairs_mantel  R Documentation 
This function generate a pairwise matrix of plots to compare the similarity of two or more correlation matrices. In the upper diagonal are presented the plots and in the lower diagonal the result of Mantel test based on permutations.
pairs_mantel( ..., type = 1, nrepet = 1000, names = NULL, prob = 0.05, diag = FALSE, export = FALSE, main = "auto", file.type = "pdf", file.name = NULL, width = 8, height = 7, resolution = 300, size.point = 0.5, shape.point = 19, alpha.point = 1, fill.point = NULL, col.point = "black", minsize = 2, maxsize = 3, signcol = "green", alpha = 0.15, diagcol = "gray", col.up.panel = "gray", col.lw.panel = "gray", col.dia.panel = "gray", pan.spacing = 0.15, digits = 2 )
... 
The input matrices. May be an output generated by the function

type 
The type of correlation if an obect generated by the function

nrepet 
The number of permutations. Default is 1000 
names 
An optional vector of names of the same length of 
prob 
The error probability for Mantel test. 
diag 
Logical argument. If 
export 
Logical argument. If 
main 
The title of the plot, set to 'auto'. 
file.type 
The format of the file if 
file.name 
The name of the plot when exported. Set to 
width 
The width of the plot, set to 
height 
The height of the plot, set to 
resolution 
The resolution of the plot if 
size.point 
The size of the points in the plot. Set to 
shape.point 
The shape of the point, set to 
alpha.point 
The value for transparency of the points: 1 = full color. 
fill.point 
The color to fill the points. Valid argument if points are between 21 and 25. 
col.point 
The color for the edge of the point, set to 
minsize 
The size of the letter that will represent the smallest correlation coefficient. 
maxsize 
The size of the letter that will represent the largest correlation coefficient. 
signcol 
The colour that indicate significant correlations (based on
the 
alpha 
The value for transparency of the color informed in

diagcol 
The color in the kernel distribution. Set to 'gray'. 
col.up.panel, col.lw.panel, col.dia.panel 
The color for the opper, lower and diagonal pannels. Set to 'gray', 'gray', and 'gray', respectively. 
pan.spacing 
The space between the pannels. Set to 0.15. 
digits 
The number of digits to show in the plot. 
An object of class gg, ggmatrix
.
Tiago Olivoto tiagoolivoto@gmail.com
mantel_test()
library(metan) # iris dataset lpc < iris %>% group_by(Species) %>% lpcor() %>% pairs_mantel(names = c('setosa', 'versicolor', 'virginica')) # mtcars dataset mt_num < select_numeric_cols(mtcars) lpdata < as.lpcor(cor(mt_num[1:5]), cor(mt_num[1:5]), cor(mt_num[2:6]), cor(mt_num[4:8])) %>% pairs_mantel()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.