View source: R/plot_mediation.R
plot_posterior_bar | R Documentation |
This function takes posterior probability results from mediation_bf() and plots barplots of posterior model probabilities.
plot_posterior_bar(
bmediatR_object,
med_annot = NULL,
mediator_id,
med_var = "protein.id",
stack = FALSE,
bar_col = c("seagreen4", "seagreen1", "skyblue", "goldenrod1", "goldenrod4", "gray"),
relabel_x = NULL,
add_number_labels = FALSE,
label_size = 5,
num_dig = 3,
main = NULL
)
bmediatR_object |
Output from bmediatR(). |
med_annot |
Annotation data for -omic mediators. |
mediator_id |
Which mediator to plot posterior model probabilities for. |
med_var |
DEFAULT: "protein.id". The column in med_annot to be used as a mediator id. |
stack |
DEFAULT: FALSE. If TRUE, a stacked barplot is produced. If FALSE, a staggered barplot is produced. |
add_number_labels |
DEFAULT: FALSE. Add posterior probabilities as text above bars. |
label_size |
DEFAULT: 5. Text size of probability labels, when included. |
num_dig |
DEFAULT: 3. The number of digits after the decimal point if probabilities are being included as labels. |
plot_posterior_bar()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.