Visualization of a prcalc_compare object.

Description

Visualization of a prcalc_compare object.

Usage

## S3 method for class 'prcalc_compare'
plot(
  x,
  subset_l2 = NULL,
  bar_width = 0.75,
  facet = FALSE,
  free_y = TRUE,
  font_size = 12,
  angle = 0,
  facet_col = 4,
  legend_pos = "bottom",
  ...
)

Arguments

x a prcalc_compare object.
subset_l2 a character vector. A subset of level 2.
bar_width Default is 0.75.
facet Separate facets by level 2? Default is FALSE.
free_y Default is TRUE.
font_size a font size. Default is 12.
angle an angle of x-ticks label (0 to 90). Defualt is 0.
facet_col a number of columns of facets. Default is 4.
legend_pos a position of legend. Default is “bottom”
Ignored

Value

A ggplot object.

Examples

library(PRcalc)

data(jp_upper_2019)

pr_obj1 <- prcalc(jp_upper_2019, m = 50, method = "dt")
pr_obj2 <- prcalc(jp_upper_2019, m = 50, method = "dt", threshold = 0.025)
pr_obj3 <- prcalc(jp_upper_2019, m = 50, method = "dt", threshold = 0.05)

list("t = 0%"   = pr_obj1,
     "t = 2.5%" = pr_obj2,
     "t = 5%"   = pr_obj3) |>
  compare() |>
  plot()