This preview shows page 1. Sign up to view the full content.
Unformatted text preview: the space between the axes
and the border of the graph of the form c(bottom, left, top,
right), the default values are c(5.1, 4.1, 4.1, 2.1)
mfcol a vector of the form c(nr,nc) which partitions the graphic window
as a matrix of nr lines and nc columns, the plots are then drawn in
columns
mfrow id. but the plots are drawn by row
pch controls the type of symbol, either an integer between 1 and 25, or any
single character within ""
1 ● 2
16 ● 17 3
18 4
5
19 ● 20 ● 6
7
21 ● 22 8
23 9
24 10 ● 11
25
* * 12
. 13 ● 14
15
X X a a ? ? ps an integer which controls the size in points of texts and symbols
pty a character which speciﬁes the type of the plotting region, "s": square,
"m": maximal
tck a value which speciﬁes the length of tickmarks on the axes as a fraction
of the smallest of the width or height of the plot; if tck=1 a grid is
drawn
tcl a value which speciﬁes the length of tickmarks on the axes as a fraction
of the height of a line of text (by default tcl=0.5)
xaxt if xaxt="n" the xaxis is set but not drawn (useful in conjonction with
axis(side=1, ...))
yaxt if yaxt="n" the yaxis is set but not drawn (useful in conjonction with
axis(side=2, ...)) Lattice (Trellis) graphics
xyplot(y˜x) bivariate plots (with many functionalities)
barchart(y˜x) histogram of the values of y with respect to those of x
dotplot(y˜x) Cleveland dot plot (stacked plots linebyline and columnbycolumn)
densityplot(˜x) density functions plot
histogram(˜x) histogram of the frequencies of x
bwplot(y˜x) “boxandwhiskers” plot
qqmath(˜x) quantiles of x with respect to the values expected under a theoretical distribution
stripplot(y˜x) single dimension plot, x must be numeric, y may be a
factor
qq(y˜x) quantiles to compare two distributions, x must be numeric, y may
be numeric, character, or factor but must have two ‘levels’
splom(˜x) matrix of bivariate plots
parallel(˜x) parallel coordinates plot
levelplot(z˜x*yg1*g2) coloured plot of the values of z at the coordinates given by x and y (x, y and z are all of the same length)
wireframe(z˜x*yg1*g2) 3d surface plot
cloud(z˜x*yg1*g2) 3d scatter plot In the normal Lattice formula, y xg1*g2 has combinations of optional conditioning variables g1 and g2 plotted on separate panels. Lattice functions
take many of the same arguments as base graphics plus also data= the data
frame for the formula variables and subset= for subsetting. Use panel=
to deﬁne a custom panel function (see apropos("panel") and ?llines).
Lattice functions return an object of class trellis and have to be printed to
produce the graph. Use print(xyplot(...)) inside functions where automatic printing doesn’t work. Use lattice.theme and lset to change Lattice
defaults. Optimization and model ﬁtting
optim(par, fn, method = c("NelderMead", "BFGS",
"CG", "LBFGSB", "SANN") generalpurpose optimization;
par is initial values, fn is function to optim...
View
Full
Document
This document was uploaded on 04/10/2014.
 Fall '14

Click to edit the document details