View source: R/ra_plot_ranking.R
ra_plot_ranking | R Documentation |
A barplot arranged in descending order is plotted for the estimates and 95
ra_plot_ranking(
x,
var,
id = "ids",
col = "red4",
format = "static",
xlab = "",
ylab = ""
)
x |
output from a stratified analysis obtained by the function ra_run_strat |
var |
variable to plot |
id |
Name given to the unique identifier of the stratified var. defaul is id = "IDs" |
col |
color of the plot |
format |
whether the figure is static (using ggplot) or interactive (using plotly) |
xlab |
label used for the x axis |
ylab |
label used for the y axis |
if type = static, a ggplot figure with the ranked strata will be returned, otherwise the a plotly figure will be returned
# use one of the examples
m <- quantrra::asf_products
# run the stratified analysis
os <- ra_run_strat(m = m$nodes, tbl = m$stratified, nsim = 5e3)
# Plot the ranking
ra_plot_ranking(x = os, var = "Pf")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.