tplot {VICCBiostat}R Documentation

T Plots

Description

Produce dot plot(s) of the given (grouped) values.

Usage

tplot(x, ...)

## S3 method for class 'formula':
tplot(formula, data = NULL, ..., subset)

## Default S3 method:
tplot(x, ..., type = "d", dist = NULL, jit = 0.05, names,
            ylim = NULL, main = NULL, sub = NULL, xlab = NULL, ylab = NULL,
            col = par("col"), pch = par("pch"), group.col = FALSE, group.pch = FALSE,
            median.line = FALSE, mean.line = FALSE, median.pars = list(col = par("col")),
            mean.pars = median.pars, boxplot.pars = NULL, show.n = FALSE,
            my.gray = gray(0.75), ann = par("ann"), axes = TRUE,
            frame.plot = axes, add = FALSE, at = NULL, horizontal = FALSE)

Arguments

formula a formula, such as y ~ grp, where y is a numeric vector of data values to be split into groups according to the grouping variable grp (usually a factor).
data a data.frame (or list) from which the variables in formula should be taken.
subset an optional vector specifying a subset of observations to be used for plotting.
x for specifying data from which the boxplots are to be produced. Either a numeric vector, or a single list containing such vectors. Additional unnamed arguments specify further data as separate vectors (each corresponding to a component dotplot). NAs are allowed in the data.
... For the formula method, named arguments to be passed to the default method.
For the default method, unnamed arguments are additional data vectors (unless x is a list when they are ignored), and named arguments are extra graphical parameters (see par).
type character vector giving the type of plot desired for each group. The following values are possible: "d" for dots, "b" for boxplots, "db" for dots over boxplots, "bd" for boxplots over dots.
dist numeric value for a distance threshold for points to be jittered. Defaults to diff(range(x))/100.
jit numeric value of how much to jitter.
names group labels which will be printed under each boxplot.
ylim the y limits of the plot.
main a main title for the plot, see also title.
sub a sub title for the plot.
xlab a label for the x axis, defaults to nothing.
ylab a label for the y axis, defaults to nothing.
col color code or name, see colors, palette.
pch character or integer code for kind of points, see points.default.
group.col a logical value indicating whether values in col correspond to individual values or groups of values.
group.pch a logical value indicating whether values in pch correspond to individual values or groups of values.
median.line, mean.line a logical value indicating whether the medians and or means should be plotted.
median.pars, mean.pars additional graphical parameters to pass to lines.
boxplot.pars additional graphical parameters to pass to boxplot.
show.n a logical value indicating whether there the sample sizes should be printed along axis 3.
my.gray color code or name, see colors, link{pallette}. The color of the secondary (background) plots.
ann a logical value indicating whether the default annotation (title and x and y axis labels) should appear on the plot.
axes a logical value indicating whether both axes should be drawn on the plot. Use graphical parameter "xaxt" or "yaxt" to suppress just one of the axes.
frame.plot a logical value indicating whether a box should be drawn around the plot.
add logical, if true add tatsukiplot to current plot.
at numeric vector giving the locations where the tatsukiplots should be drawn, particularly when add = TRUE; defaults to 1:n where n is the number of groups.
horizontal logical indicating if the plots should be horizontal; default FALSE means vertical.

Details

The arguments type, col, pch may be vectors and will be recycled.

Author(s)

Tatsuki Koyama
Department of Biostatistics
Vanderbilt University
tatsuki.koyama@vanderbilt.edu

Will Gray
Department of Biostatistics
Vanderbilt University
w.gray@vanderbilt.edu

See Also

boxplot, dotplot.

Examples


tatsukiplot(v ~ g, dist=0.1, jit=0.1, ylab='Values', col=sex, pch=c(1,19,3,8,15), group.pch=TRUE, cex=0.75)

[Package VICCBiostat version 1.0 Index]