ra_plot_ranking: Barplot used to rank the estimate and 95 percentile of the...

View source: R/ra_plot_ranking.R

ra_plot_rankingR Documentation

Barplot used to rank the estimate and 95 percentile of the output

Description

A barplot arranged in descending order is plotted for the estimates and 95

Usage

ra_plot_ranking(
  x,
  var,
  id = "ids",
  col = "red4",
  format = "static",
  xlab = "",
  ylab = ""
)

Arguments

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

Value

if type = static, a ggplot figure with the ranked strata will be returned, otherwise the a plotly figure will be returned

Examples

# 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")


jpablo91/QuantRRA documentation built on July 3, 2024, 10:46 p.m.