Learn R Programming

forestplot (version 1.8)

prFpGetGraphTicksAndClips: A helper function to forestplot

Description

Gets the x-label and zero-bar details

Usage

prFpGetGraphTicksAndClips(xticks, xticks.digits, grid, xlog, xlab,
  lwd.xaxis, col, txt_gp, clip, zero, x_range, mean, graph.pos)

Arguments

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.

xticks.digits

The number of digits to allow in the x-axis if this is created by default

grid

If you want a discrete gray dashed grid at the level of the ticks you can set this parameter to TRUE. If you set the parameter to a vector of values lines will be drawn at the corresponding positions. If you want to specify the gpar of the lines then either directly pass a gpar object or set the gp attribute e.g. attr(line_vector, "gp") <- gpar(lty=2, col = "red")

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.

xlab

x-axis label

lwd.xaxis

lwd for the xaxis, see gpar

col

Set the colors for all the elements. See fpColors for details

txt_gp

Set the fonts etc for all text elements. See fpTxtGp for details

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.

x_range

The range that the values from the different confidence interval span

mean

The original means, either matrix or vector

graph.pos

The position of the graph element within the table of text. The position can be 1-(ncol(labeltext) + 1). You can also choose set the positin to "left" or "right".

Value

list Returns a list with axis_vp, axisGrob, labGrob, zero and clip