barplot_hp | R Documentation |
Visualization of individual effects in hierarchical partitioning (HP) using column diagram.
barplot_hp( x, order.var = TRUE, decreasing.var = TRUE, cutoff = -1, col.fill = "valid", col.color = NULL, col.width = 0.6, show.effect = TRUE, effect.cex = 2.7, title.cex = 10, axis.cex = 8 )
x |
A |
order.var |
The predictors in the matrix layout should be ordered by. Default is |
decreasing.var |
If |
cutoff |
Effect values below |
col.fill |
How the bars should be colored. Options include |
col.color |
Color of bars. |
col.width |
Width of bars, default is |
show.effect |
Show the effect values above bars, default is |
effect.cex |
Font size of the effect values, default is |
title.cex |
Font size of axis titles, default is |
axis.cex |
Font size of axis labels, default is |
This function is used to visualize the object of rdacca.hp
(Lai et al. 2022), which calculates the individual effects of predictor variables or groups of predictor variables in canonical analysis based on HP.
Returns a ggplot2.
Lai J, Zou Y, Zhang J, et al. Generalizing hierarchical and variation partitioning in multiple regression and canonical analyses using the rdacca.hp R package. Methods in Ecology and Evolution, 2022.
library(rdacca.hp) ## A simple example of partial dbRDA data(baima.fun) data(baima.env) # Bray-Curtis index was used to calculate community composition dissimilarity baima.fun.bray <- vegdist(baima.fun, method = "bray") # Quantify the individual effects of soil properties on EcM fungal community composition soil <- baima.env[c("pH", "TP", "TK", "AN", "AP", "AK")] baima.soil.vp <- rdacca.hp(baima.fun.bray, soil, method = "dbRDA", type = "adjR2") # Plot individual effects barplot_hp(baima.soil.vp, col.fill = "var", col.color = c("#8DD3C7", "#FFFFB3", "#BEBADA", "#FB8072", "#80B1D3", "#FDB462", "#B3DE69"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.