Learn R Programming

forestplot (version 1.10)

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)

Arguments

upper

The upper bound of the confidence interval for the forestplot, needs to be the same format as the mean, i.e. matrix/vector of equal columns \& length

lower

The lower bound of the confidence interval for the forestplot, needs to be the same format as the mean, i.e. matrix/vector of equal columns & length

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 supressed.

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 regressoin (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.

Value

vector Contains a min and max value