Learn R Programming

forestplot (version 3.1.5)

prFpXrange: Gets the x-axis range

Description

If the borders are smaller than the upper/lower limits then clip the graph. The line will have arrows indicating that it continues beyond the graph The zero bar has to be on the chart though!

Usage

prFpXrange(upper, lower, clip, zero, xticks, xlog)

Value

vector Contains a min and max value

Arguments

upper

The upper bound of the confidence interval for the forestplot, needs to be the same format as the mean.

lower

The lower bound of the confidence interval for the forestplot, needs to be the same format as the mean.

clip

Lower and upper limits for clipping confidence intervals to arrows

zero

x-axis coordinate for zero line. If you provide a vector of length 2 it will print a rectangle instead of just a line. If you provide NA the line is suppressed.

xticks

Optional user-specified x-axis tick marks. Specify NULL to use the defaults, numeric(0) to omit the x-axis. By adding a labels-attribute, attr(my_ticks, "labels") <- ... you can dictate the outputted text at each tick. If you specify a boolean vector then ticks indicated with FALSE wont be printed. Note that the labels have to be the same length as the main variable.

xlog

If TRUE, x-axis tick marks are to follow a logarithmic scale, e.g. for logistic regression (OR), survival estimates (HR), Poisson regression etc. Note: This is an intentional break with the original forestplot function as I've found that exponentiated ticks/clips/zero effect are more difficult to for non-statisticians and there are sometimes issues with rounding the tick marks properly.