R/geom_cri.R

Defines functions geom_cri

Documented in geom_cri

#' Credible interval ggplot geom
#' 
#' @param plot.cri Should we plot CrI? Logical
#' @param params Plot parameters including data
#' @keywords internal aplot
#' 
geom_cri <- function(plot.cri = TRUE,
                     params = NA) {
  if (plot.cri) {
    list(geom_line(data = params$data,
                   aes(y = .data$low,
                       group = .data$comp),
                   linetype = 2),
         geom_line(data = params$data,
                   aes(y = .data$upp,
                       group = .data$comp),
                   linetype = 2))
  } else list(NULL)
}

Try the BCEA package in your browser

Any scripts or data that you put into this service are public.

BCEA documentation built on Nov. 25, 2023, 5:08 p.m.