Learn R Programming

Forest plot package

The forestplot package enables the creation of advanced forest plots, offering features such as multiple confidence intervals per row, customizable fonts for individual text elements, and custom confidence interval drawing functions. Additionally, it supports text mixed with mathematical expressions, extending the use of forest plots beyond traditional meta-analyses. This package is a more general version of the original 'rmeta' package's forestplot function, with heavy reliance on the 'grid' package for graphical elements.

Questions

Given the package's popularity, it's recommended to ask questions on StackOverflow where others can benefit from the shared knowledge. Please use the r-forestplot tag to ensure your question is easily discoverable.

Contributing

All contributions are welcome! The package is managed on GitHub. To contribute, consider starting by creating an issue. If you have a solution, feel free to fork the repository, make your changes, and submit a pull request when you're ready.

Copy Link

Version

Install

install.packages('forestplot')

Monthly Downloads

12,772

Version

3.1.6

License

GPL-2

Maintainer

Max Gordon

Last Published

November 19th, 2024

Functions in forestplot (3.1.6)

fp_set_zebra_style

Decorate the plot with a zebra pattern
getTicks

Ticks for plot axis
heightDetails.xaxis

Gets the height for an x-axis object
fp_decorate_graph

Decorate the graph
prFpGetLayoutVP

Get the main forestplot
prFpGetLegendBoxPosition

Converts legend position to a standard position
prFpValidateLabelList

Validate the forestplot label list
prGetShapeGp

A function to extract graphical parameters from a fpShapesGp object
fpTxtGp

Get font settings for forestplot
prMergeGp

A function to merge two sets of graphical parameters
fp_add_lines

Adds a line to the graph
prGridPlotTitle

Adds a title to the plot
fp_insert_row

Insert/append rows into forestplot
prepGraphPositions

Prepares graph position
prepGridMargins

Convert margins to viewport npc margins
prFpConvertMultidimArray

Converts a 2D or 3D array to mean, lower, upper
prFpPrintLabels

Plots the labels
prGetLabelsList

Gets the forestplot labels
prFpGetConfintFnList

Get a function list
fp_set_style

Set the style of the graph
prGetTextGrobCex

Just a simple access to the gp$cex parameter
fp_txt_italic

Text styling
prFpFindWidestGrob

Finds the widest grob in the current list of grobs
prPopulateList

Populate a list corresponding to matrix specs
prFpPrepareLegendMarker

Prepares the legend marker function
safeLoadPackage

Safely loads package
prFpXrange

Gets the x-axis range
prGparMerge

prepLabelText

Prepares label text
prepLines

Prepares the lines for the plot
prPushMarginViewport

Pushes viewport with margins
prepAlign

Prepares graph position
prListRep

An alternative to rep()
fpShapesGp

A function for graphical parameters of the shapes used in forestplot()
assertAndRetrieveTidyValue

Retriever of tidyselect
dfHRQoL

Regression coefficients and confidence intervals from HRQoL study
fpColors

A function for the color elements used in forestplot()
forestplot-package

Package description
fpLegend

A function for the legend used in forestplot()
fpDrawNormalCI

Draw standard confidence intervals
forestplot

Draws a forest plot
prDefaultGp

Construct default parameters from arguments that may include missing arguments
prFpFetchRowLabel

Get the label
prFpDrawLine

Draws a straight line
drawHorizontalLines

Draws the horizontal lines
HRQoL

Regression coefficients and confidence intervals from HRQoL study