Usage
spine(x, ...)
## S3 method for class 'default':
spine(x, y = NULL,
breaks = NULL, ylab_tol = 0.05, off = NULL,
main = "", xlab = NULL, ylab = NULL, ylim = c(0, 1), margins = c(5.1, 4.1, 4.1, 3.1),
gp = gpar(), name = "spineplot", newpage = TRUE, pop = TRUE,
...)
## S3 method for class 'formula':
spine(formula, data = list(),
breaks = NULL, ylab_tol = 0.05, off = NULL,
main = "", xlab = NULL, ylab = NULL, ylim = c(0, 1), margins = c(5.1, 4.1, 4.1, 3.1),
gp = gpar(), name = "spineplot", newpage = TRUE, pop = TRUE,
...)
Arguments
x
an object, the default method expects either a single variable
(interpreted to be the explanatory variable) or a 2-way table. See details.
y
a "factor"
interpreted to be the dependent variable
formula
a "formula"
of type y ~ x
with a single dependent "factor"
and a single explanatory variable.
data
an optional data frame.
breaks
if the explantory variable is numeric, this controls how
it is discretized. breaks
is passed to hist
and can
be a list of arguments. ylab_tol
convenience tolerance parameter for y-axis annotation.
If the distance between two labels drops under this threshold, they are
plotted equidistantly.
off
vertical offset between the bars (in per cent). It is fixed to
0
for spinograms and defaults to 2
for spine plots.
main, xlab, ylab
character strings for annotation
ylim
limits for the y axis
gp
a "gpar"
object controlling the grid graphical
parameters of the rectangles. It should specify in particular a vector of
fill
colors of the same length as levels(y)
. The default is
to call
name
name of the plotting viewport.
pop
logical. Should the viewport created be popped?