These plot functions are deprecated and may be removed as soon as the
next release of r2spss. The functions plotSPSS,
linesSPSS, boxSPSS, and histSPSS are built around
base R graphics and have been superseded by functions built on
ggplot2.
plotSPSS(data, variables, xlab = NULL, ylab = NULL, ...)linesSPSS(data, variables, index = NULL, xlab = NULL, ylab = NULL, ...)
boxplotSPSS(
data,
variables,
group = NULL,
xlab = NULL,
ylab = NULL,
cut.names = NULL,
...
)
histSPSS(data, variable, normal = FALSE, xlab = NULL, ylab = NULL, ...)
a data frame containing the variables to be plotted.
For plotSPSS, a character vector specifying at
least two variables to be plotted. In case of two variables, a simple
scatter plot is produced with the first variable on the \(x\)-axis and the
second variable on the \(y\)-axis. In case of more than two variables, a
scatter plot matrix is produced.
For linesSPSS, a character vector specifying at least one variable
to be plotted on the \(y\)-axis. In case of multiple variables, separate
lines are drawn for each variable and a legend is shown.
For boxplotSPSS, a character vector specifying separate variables to
be plotted. If group is not NULL, only the first variable is
used and box plots of groups of observations are drawn instead.
the axis labels.
a character string specifying a variable to be plotted on the
\(x\)-axis, or NULL to plot the observations against their index.
an character string specifying a grouping variable, or
NULL for no grouping.
a logical indicating whether to cut long variable names or
group labels to 8 characters. The default is TRUE for box plots of
separate variables, but FALSE for box plots of groups of observations
(which mimics SPSS behavior).
a character string specifying the variable to be plotted.
a logical indicating whether to add a normal density with the
estimated mean and standard deviation (the default is FALSE).
plotSPSS and linesSPSS do not return anything but produce a
plot.
boxplotSPSS returns a list containing summary statistics invisibly
(see boxplot) and produces a plot.
histSPSS returns an object of class "histogram" invisibly (see
hist) and produces a plot.
plotSPSS draws a scatter plot or a scatter plot matrix of variables
in a data frame.
linesSPSS draws connected lines for variables in a data frame.
boxplotSPSS draw box plots of variables in a data frame, including
box plots for groups of observations and box plots for separate variables.
histSPSS draws a histogram of a variable in a data frame.
The plots thereby mimic the look of graphs in older versions of SPSS (<24).