Learn R Programming

⚠️There's a newer version (3.1.6) of this package.Take me there.

The Forestplot package

A forest plot that allows for multiple confidence intervals per row, custom fonts for each text element, custom confidence intervals, text mixed with expressions, and more. The aim is to extend the use of forest plots beyond meta-analyses. This is a more general version of the original 'rmeta' package's forestplot function and relies heavily on the 'grid' package.

Questions

Due to the package's popularity I suggest that you start with asking questions on StackOverflow so that others can learn from your own problems. Add the tag r and forestplot so that others can quickly find the question.

Contributing

All contributions are welcome. The package is managed at GitHub and I suggest that you start with creating an issue. If you feel that you're able to solve the coding on your own then fork the package and once you're done, create a pull request.

Copy Link

Version

Install

install.packages('forestplot')

Monthly Downloads

12,772

Version

3.1.1

License

GPL-2

Maintainer

Max Gordon

Last Published

December 6th, 2022

Functions in forestplot (3.1.1)

dfHRQoL

Regression coefficients and confidence intervals from HRQoL study
forestplot-package

Package description
fpColors

A function for the color elements used in forestplot()
fpShapesGp

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

Draw standard confidence intervals
assertAndRetrieveTidyValue

Retriever of tidyselect
fpLegend

A function for the legend used in forestplot()
forestplot

Draws a forest plot
drawHorizontalLines

Draws the horizontal lines
HRQoL

Regression coefficients and confidence intervals from HRQoL study
getTicks

Ticks for plot axis
fp_set_zebra_style

Decorate the plot with a zebra pattern
fp_decorate_graph

Decorate the graph
prDefaultGp

Construct default parameters from arguments that may include missing arguments
fpTxtGp

Get font settings for forestplot
prFpDrawLine

Draws a straight line
prFpPrepareLegendMarker

Prepares the legend marker function
fp_add_lines

Adds a line to the graph
prFpFindWidestGrob

Finds the widest grob in the current list of grobs
heightDetails.xaxis

Gets the height for an x-axis object
prFpFetchRowLabel

Get the label
prFpConvertMultidimArray

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

Get the main forestplot
prFpGetLegendBoxPosition

Converts legend position to a standard position
prFpGetConfintFnList

Get a function list
prGparMerge

prGetTextGrobCex

Just a simple access to the gp$cex parameter
prFpPrintLabels

Plots the labels
prGridPlotTitle

Adds a title to the plot
prFpXrange

Gets the x-axis range
prFpValidateLabelList

Validate the forestplot label list
fp_txt_italic

Text styling
fp_set_style

Set the style of the graph
prListRep

An alternative to rep()
prGetShapeGp

A function to extract graphical parameters from a fpShapesGp object
prGetLabelsList

Gets the forestplot labels
prMergeGp

A function to merge two sets of graphical parameters
prPopulateList

Populate a list corresponding to matrix specs
prepLabelText

Prepares label text
prepLines

Prepares the lines for the plot
prPushMarginViewport

Pushes viewport with margins
fp_insert_row

Insert/append rows into forestplot
prepGraphPositions

Prepares graph position
safeLoadPackage

Safely loads package
prepGridMargins

Convert margins to viewport npc margins
prepAlign

Prepares graph position