forestplot: Draw a Forestplot of Measures of Effects

View source: R/forestplot.R

forestplotR Documentation

Draw a Forestplot of Measures of Effects

Description

This version is a simplified version of ggforest::forestplot that removes confidence interval computation and allows for a lower bound and upper bound values

Usage

forestplot(
  df,
  name = author,
  r_legend = NULL,
  l_legend = NULL,
  estimate = VE,
  lower = LB,
  upper = UB,
  colour = NULL,
  shape = NULL,
  xrange = c(0, 100),
  xbreaks = c(0, 25, 50, 75, 100),
  base_size = 13,
  legend_size = 3,
  ...
)

Arguments

df

A data frame with the data to plot. It must contain at least three variables, a character column with the names to be displayed on the y-axis (see parameter name), a numeric column with the value (or the log of the value) to display (see parameter estimate) .

name

the variable in df that contains the y-axis names. This argument is automatically quoted and evaluated in the context of the df data frame. See Note.

r_legend

the variable in df that contains right legend information

l_legend

the variable in df that contains left legend information groups of points. This argument is automatically quoted and evaluated in the context of the df data frame. See Note.

estimate

the variable in df that contains the values to be displayed. This argument is automatically quoted and evaluated in the context of the df data frame. See Note.

lower

the variable in df that contains the values to be displayed

upper

the variable in df that contains the values to be displayed.

colour

the variable in df by which to colour the different

shape

the variable in df by which to shape the different

xrange

default range of x range. Alternate striped background will use this value. The actual xlim parameter from ggplot will be expanded by 10% each side. Values outside this range will not be diplayed

xbreaks

breaks on x axis

base_size

base font size, given in pts.

legend_size

Size of left and right legend (not sure of unit but definitively not the same as base_size) ylab, xlab, xtickbreaks etc. to be passed along.

...

ggplot2 graphical parameters such as title,

Value

A ggplot object.

Author(s)

Maria Kalimeri, Ilari Scheinin, Vilma Jagerroos


JMPivette/covidDashUtils documentation built on July 13, 2024, 11:08 a.m.