mp_plot_dist {MicrobiotaProcess} | R Documentation |
Plotting the distance between the samples with heatmap or boxplot.
mp_plot_dist( .data, .distmethod, .group = NULL, group.test = FALSE, hclustmethod = "average", test = "wilcox.test", comparisons = NULL, step_increase = 0.1, ... ) ## S4 method for signature 'MPSE' mp_plot_dist( .data, .distmethod, .group = NULL, group.test = FALSE, hclustmethod = "average", test = "wilcox.test", comparisons = NULL, step_increase = 0.1, ... ) ## S4 method for signature 'tbl_mpse' mp_plot_dist( .data, .distmethod, .group = NULL, group.test = FALSE, hclustmethod = "average", test = "wilcox.test", comparisons = NULL, step_increase = 0.1, ... ) ## S4 method for signature 'grouped_df_mpse' mp_plot_dist( .data, .distmethod, .group = NULL, group.test = FALSE, hclustmethod = "average", test = "wilcox.test", comparisons = NULL, step_increase = 0.1, ... )
.data |
the MPSE or tbl_mpse object after [mp_cal_dist()] is performed with action="add" |
.distmethod |
the column names of distance of samples, it will generate after [mp_cal_dist()] is performed. |
.group |
the column names of group, default is NULL, when it is not provided
the heatmap of distance between samples will be returned. If it is provided and
|
group.test |
logical default is FALSE, see the |
hclustmethod |
character the method of |
test |
the name of the statistical test, default is 'wilcox.test' |
comparisons |
A list of length-2 vectors. The entries in the vector are either the names of 2 values on the x-axis or the 2 integers that correspond to the index of the columns of interest, default is NULL, meaning it will be calculated automatically with the names in the .group. |
step_increase |
numeric vector with the increase in fraction of total height for every additional comparison to minimize overlap, default is 0.1. |
... |
additional parameters, see also |
Shuangbin Xu
[mp_cal_dist()] and [mp_extract_dist()]
## Not run: data(mouse.time.mpse) mouse.time.mpse %<>% mp_decostand(.abundance=Abundance) mouse.time.mpse mouse.time.mpse %<>% mp_cal_dist(.abundance=hellinger, distmethod="bray") mouse.time.mpse p1 <- mouse.time.mpse %>% mp_plot_dist(.distmethod=bray) p2 <- mouse.time.mpse %>% mp_plot_dist(.distmethod=bray, .group=time, group.test=TRUE) p3 <- mouse.time.mpse %>% mp_plot_dist(.distmethod=bray, .group=time) ## End(Not run)