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,324

Version

3.1.5

License

GPL-2

Maintainer

Last Published

October 11th, 2024

Functions in forestplot (3.1.5)

prFpFetchRowLabel

Get the label
prFpGetLayoutVP

Get the main forestplot
prFpXrange

Gets the x-axis range
prFpValidateLabelList

Validate the forestplot label list
prFpPrepareLegendMarker

Prepares the legend marker function
prFpPrintLabels

Plots the labels
prMergeGp

A function to merge two sets of graphical parameters
prPopulateList

Populate a list corresponding to matrix specs
prepAlign

Prepares graph position
prPushMarginViewport

Pushes viewport with margins
prGetLabelsList

Gets the forestplot labels
prGetShapeGp

A function to extract graphical parameters from a fpShapesGp object
fp_insert_row

Insert/append rows into forestplot
safeLoadPackage

Safely loads package
prFpGetConfintFnList

Get a function list
prepGraphPositions

Prepares graph position
prepGridMargins

Convert margins to viewport npc margins
prGparMerge

prGetTextGrobCex

Just a simple access to the gp$cex parameter
prFpFindWidestGrob

Finds the widest grob in the current list of grobs
prepLines

Prepares the lines for the plot
prepLabelText

Prepares label text
fp_set_style

Set the style of the graph
prGridPlotTitle

Adds a title to the plot
prFpGetLegendBoxPosition

Converts legend position to a standard position
prListRep

An alternative to rep()
fp_txt_italic

Text styling
HRQoL

Regression coefficients and confidence intervals from HRQoL study
forestplot

Draws a forest plot
fpColors

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

Package description
fpShapesGp

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

A function for the legend used in forestplot()
fpDrawNormalCI

Draw standard confidence intervals
assertAndRetrieveTidyValue

Retriever of tidyselect
dfHRQoL

Regression coefficients and confidence intervals from HRQoL study
drawHorizontalLines

Draws the horizontal lines
getTicks

Ticks for plot axis
heightDetails.xaxis

Gets the height for an x-axis object
fp_add_lines

Adds a line to the graph
prDefaultGp

Construct default parameters from arguments that may include missing arguments
fpTxtGp

Get font settings for forestplot
fp_decorate_graph

Decorate the graph
prFpDrawLine

Draws a straight line
fp_set_zebra_style

Decorate the plot with a zebra pattern
prFpConvertMultidimArray

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