Index
−1
estimate terms for each mean
remove the intercept
0
censoring indicator
count data
logical FALSE
replace missing values
status = censored
testing for zeros
1
logical TRUE
the intercept is parameter one
−
deletion of an explanatory variable from the model (not subtraction)
subtraction
!
logical NOT
selecting rows of a dataframe
! factorial
binomial distribution
Fisher's exact test
introduction
x! = x × (x – 1) × (x – 2)×· · ·×3 × 2
!=
not equal
!duplicated
not duplicated for dates and times
produce a set of subscripts that would select the non-duplicated values from an object
removing duplicate rows from a dataframe
removing pseudoreplication
!is.na
not missing values
!is.numeric
not numeric
""
issues with quote marks in SQL queries
"\a"
bell
"\b"
backspace
"\f"
form feed
"\n"
new line
removing using strsplit
separators with scan
"\r"
carriage return
"\t"
multiple tabs
removing using strsplit
separators with scan
tab character
"\v"
vertical tab
#
add comments to your R code
$
component selection
extracting information from summary(model)
indexing tagged lists
last character with grep
list indexing
variable names from dataframes
$fitted
function for model-checking
$infmat
jackknife
$resid
function for model-checking
%%
modulo
modulo with barplot to combine two distributions
remainder
%∗%
matrix multiplication
sum of products
%/%
integer quotients
%in%
as a subscript
character strings
sapply
set theory
&
combinations of T and F
logical AND
&&
logical AND with if
∗
inclusion of explanatory variables and interactions (not multiplication)
main effects and interactions in model formula
multiplication
wildcards in SQL queries using LIKE
. (dot)
anything character with grep
…
variable numbers of arguments (triple dot)
.Call
interface to compiled code
. convention
fit all the explanatory variables
.External
.GlobalEnv
environments in R
.Internal
interface to compiled code
.Primitive
.Random.seed
recall same random numbers
/
division
nesting of explanatory variables in the model (not division)
:
create a sequence
create factor levels
interaction term in model formula
sequence generation
;
multiple statements per line
?
help in R
??
help in R
[]
square brackets are subscripts
subscripts for subsetting
[,]
twin subscripts on dataframes
[,c]
column subscripts
[[]]
subscripts on lists have double brackets
with triple dot
[[1]]
list subscripts
[–1]
drop the first element from a vector
[1]
select the first element from a vector
[a,b)
greater than or equal to a but less than b
[A–E]
select a range of characters with grep
[r,]
row subscripts
\
backslash for quoting metacharacters
∧
caret symbol
first character with grep
highest interactions in model formula
powers and roots
{}
curly brackets with for loops
{n}
character counting in words
|
combinations of TRUE and FALSE (OR)
conditioning so y∼x | z is read y as a function of x given z
given with coplot
logical OR
∥
logical OR with if
∼
tilde, meaning ‘as a function of’
∼
statistical models
∼ . -
update
∼∼
extra spaces in expressions
∼1
estimate the intercept
fitting the null model
+
addition
continuation character
inclusion of an explanatory variable in the model (not addition)
<
less than
<
(read as “gets”)
assignment in R
destroys existing variables of the same name
<- a <- b <- c
multiple allocation
<=
less than or equal to
==
logical equals (double equals)
>
greater than
>
prompt (new command line)
>=
greater than or equal to
–1
estimate terms for each mean
remove the intercept
0
censoring indicator
count data
logical FALSE
replace missing values
status = censored
testing for zeros
0 and 1
binary response variable
0 in tables
tabulate rather than table
1
logical TRUE
the intercept is parameter one
1-β
Type II error rate (= 0.2)
2 by 2 contingency tables
log-linear model of count data
Mendel's peas
2/3 power of the response
normal errors
25th percentile
box-and-whisker plot
summary
2-parameter asymptotic exponential
non-linear models
2-parameter logistic
3D graphics
vis.gam output from gam
3-dimensional array
3-dimensional plots
introduction
3D-like object
persp or wireframe
3D surfaces
wireframe
3-parameter asymptotic exponential
non-linear models
3-parameter logistic
non-linear models
45 degree line
abline(0,1)
4-parameter logistic
non-linear models
75th percentile
box-and-whisker plot
summary
9:3:3:1 ratio
Mendel's peas
rescale.p=TRUE
95% confidence interval
introduction
a
intercept
abline
instead of grid
regression line through a scatterplot
abline(0,1), 45 degree line
abline(h=y)
horizontal line at height y
abline(model)
drawing your own piecewise lines
fit a line through a scatterplot
abline(v=x)
vertical line at location x
abline using subscripts
in ANCOVA
abs
absolute value (ignore the minus sign if present)
closest values
absolute value (ignore the minus sign if present)
abs
absolute values
rather than sum of squares
acf
autocorrelation function
for two time series
plot(ACF)
acf(type="p")
partial autocorrelation
acos
inverse cosine
add a legend to a plot
legend
add columns to a matrix or dataframe
cbind
add extra lines to a graph
lines
add extra points to a graph
points
adding a column to a dataframe
cbind
adding rows and columns to a dataframe
addition
+
additive or multiplicative errors
additivity
log response
address within vectors
which
add rows to a matrix or dataframe
rbind
add some not all of the numbers
logical subscripts
add=TRUE
with image to ensure smooth transition between frames
adequate models
introduction
adj
text justification
adjoint of a matrix
adjusted r2 value
extracting from summary(model)
summary.lm
age at death
censoring
exponential errors
introduction
variance
age effects and cohort effects
longitudinal data
aggregate
alternative to tapply
dataframe summary
eliminating pseudoreplication
for summarizing dataframes
summary statistics
with length
aggregated
spatial point processes
aggregated pattern and quadrat count data
aggregation
comparing data with a Poisson distribution
Taylor's power law
AIC
Akaike's information criterion
binary response variable
comparing time series models
introductory example
from lists of models using lapply
function for model-checking
hand calculation
with offsets
Akaike's information criterion
introduction
akima
installed package
aliasing
correlation of explanatory variables
intentional aliasing
introduction
NA in summary(model)
piecewise regression
alive
last seen alive
all
logical function
logical operations
all.equal
comparing factors and characters
equality of floating point numbers
all=T
merge
along
in sequences
is.na
sequence generation
alpha
Type I error rate (= 0.05)
alphabetic order of factor levels
over-riding the default
alternative hypothesis
in one-way ANOVA
Student's t test
always look at your data
Anscombe's famous data
am/pm indicator
%p AM/PM indicator in the locale
analysis of covariance
illustration
introduction to ANCOVA
maximal model
model simplification
analysis of deviance
log-linear model of count data
Analysis of Ecological and Environmental Data
task views
Analysis of Pharmacokinetic Data
task views
Analysis of Spatial Data
task views
analysis of variance
introduction
with regression
ANCOVA
ANCOVA or mixed effects models
binary response variable
compared with mixed effects model
equivalent in gam
factorial experiment
famous five
illustration
introduction
model formulae
plots of fitted values
plots using subscripts
standard error of the intercept
survival analysis
with proportion data
AND
&
combinations of T and F
angle = 45
cross-hatching, 919–20
anisotropy
spatial autocorrelation
anonymous functions
apply
example
plot.design
sapply
tapply
anova
as summary.aov
compare two non-linear models
compare two survivorship models
comparing two regression models
contingency table analysis, 605, 609–10
for model objects
model formulae
piecewise regression
power.anova.test
ANOVA table
format using cat
in ANCOVA
in one-way ANOVA
soil data
with regression
ANOVA to compare models
gam
mixed effects models
Anscombe's famous data
always look at your data
antilog
geometric mean
transformations
antilog base e
exp
antolog
introduction
any
logical test
anything character with grep
. (dot)
aov
fit a one-way ANOVA
with Error
aov with Error
rats example
aperm
re-order a multidimensional table
transpose an array
aphids
dangers involved in contingency tables
a posteriori contrasts
apply
anonymous functions
column means
counting missing values
function to one margin of a matrix
introduction
standard deviations
a priori contrasts
apropos
vector of matching names
AR
autoregressive models
arbitrary number of arguments to a function
triple dot …
arcsine
transformation
arcsine transformation
background
area
incidence functions
Arg
argument of complex number
argument lists
introduction
argument matching
argument of complex number
Arg
arguments
exact matching on tags
arguments to a function
triple dot
arima
fits time series models
lynx example
arithmetic mean
function
maximum likelihood
arithmetic operations
introduction
ARMA
autoregressive moving average models
array
create an array with specified dimensions
arrays
changing the dimensions
introduction
arrows
adding shapes to a graph
fat arrows function
for error bars
phase planes
shape of head
as.character
coercion
names on maps
as.complex
coercion
as.data.frame
admissions data
coercion
dataframe from a table
expanding a table into a dataframe
table to dataframe
with readLines
with scan
as.data.frame.table, 3-dimensional contingency table
producing a shorter summary dataframe
as.Date
coercion
as.difftime
coercion
as.expression(substitute)
calculated values in expressions
as.factor
coercion
as.formula
for complex model formulae
as.integer
coercion
as.is
with read.table
as.list
using scan
as.numeric
coercion
factors in a dataframe
lapply
Sys.time
with unlist
as.POSIXct
coercion
as.POSIXlt
introduction
as.vector
coercion
to remove names from objects
ask = TRUE
input requested before the next graphic
assign
str of linear model
assignment
destroys existing variables of the same name
gets arrow <-
asin
inverse sine
as is I
background
introduction
model formulae
piecewise regression
polynomials
assocplot
Cohen–Friendly association plot
assumptions
additive effects
constant variance
in one-way ANOVA
independent errors
linear regression
mixed effects models
normal errors
simple is best
asymptote
Michaelis–Menten
polynomials
asymptotic exponential
behaviour at the limits
introduction
non-linear models
parameter estimation
asymptotic exponential vs. Michaelis–Menten
nonlinear regression
asymptotic regression model
SSasymp
asymptotic regression model through the origin
SSasympOrig
asymptotic regression model with an offset
SSasympOff
atan
inverse tangent
attach
dataframe from a package
dataframe operations
masking
use with instead to avoid masking
used in this book
attach or with
best practice
attributes
find levels and class of an object
of a matrix
using all.equal
attributes of a factor
contrasts
augPred
predict families of curves
auto.key
panel plots
autocorrelation
model criticism
residuals
time series
autocorrelation function
acf
autoregressive (AR) models
time series models
autoregressive moving average (ARMA) models
averaging away the pseudoreplication
example
rats example
axes
counting things on maps
axes and boxes
colour
axes=FALSE
plot with no axes
axis
graphics parameters explained
non-default labelling
non-standard labels for tick marks
phase planes
axis 1
bottom (x axis)
axis 2
left (yaxis)
axis 3
top
axis 4
right
axis colour
col.axis
azimuthal direction
persp
b
derivation of slope
parameter of the power function
slope of straight line
SSXY/SSX
background colour for plots
bg
background colour in plotting symbols
introduction
multiple time series
background colours
colour of the paper
par(bg="wheat2")
backspace
"\b"
back-transform to proportions
logits
back-transformation
logits to proportions
predict with model
bacteria data
MASS library
pseudoreplication
balls in urns
hypergeometric distribution
bandwidth
density estimation
bar chart
introduction
barchart
panels of barplots
barplot
beside=T
binomial distribution
comparing data with a Poisson distribution
count data from quadrats
cross-hatching
Daphnia data
density function of the geometric distribution
for side by side distributions 0s, 1s, etc.
from tapply
hypergeometric distribution
in one-way ANOVA
introduction
legend
negative binomial distribution
overlay a smooth line
rotating long bar labels to eliminate overlap
two distributions combined 0s, 1s, etc.
barplots
barchart
Bartlett's test
comparing several variances
bartlett.test
comparing several variances
comparing two variances
base e logarithms
introduction
base of natural logarithms
e = 2.71828
baseline hazard function
Cox proportional hazards model
basename
file paths
Bayesian Inference
task views
Bayesian inference Using Gibbs Sampling
BUGS
Bayesian statistics
credible interval
introduction
likelihood of our model, given the data
model choice
probability background
shrinkage
BCa
bias-corrected accelerated percentile
BCa interval
in regression
behaviour at the limits
asymptotic exponential
asymptotic function
introduction
logistic
bell
"\a"
bell-shaped
non-linear models
Bernoulli distribution
binary response variable
introduction
beside=T
barplots
best linear unbiased predictors
BLUP
beta
beta distribution
power of the test
beta distribution
beta
introduction
bg
background colour for plots
background colour in plotting symbols
bg="wheat2"
background colours
BH
multiple comparisons
bias
meta-analysis
bias-corrected accelerated percentile
Bca
biexponential
non-linear models
biexponential model
humped curves
SSbiexp
binary
function to create binary representation of a number
binary data
random-effects meta-analysis
binary data expressed as proportion data
binary representation of a number
binary response variable
ANCOVA
Bernoulli distribution
box-and-whisker plot
continuous explanatory variable
gam
introduction
no such thing as overdispersion
predict(type="response")
smooth line from a logistic model
subset
with non-parametric smoothers
binary response with pseudoreplication
binom
binomial sample size
binom.test
introduction
two-category table
binomial
deviance formula
binomial coefficients n!/(x! (n – x)!)
choose(n,x)
binomial data
quasibinomial
binomial denominator
number of attempts
binomial distribution
introduction
binomial errors
logit link
overdispersion
useful with data on proportions
binomial glm
model simplification
binomial link function
logit(p)
binomial priors
Bayesian statistics
binomial sample size
binom
binomial standard errors
for plots
binomial test
proportion data
binomial variance
illustration
bins
for count data
in histograms
bin widths
drawing a smooth curve
hist
using cut
biomass
error.bars
biplot
principal components analysis
black is rgb(0, 0, 0)
rgb
blank axes labels
xlab=""
ylab=""
blank spaces
in variable names
blank spaces in names
read.csv
blank subscripts
all rows or all columns
blocking
analysis of variance
example split plot
paired t test
BLUP
best linear unbiased predictors
Bonferroni
multiple comparisons
bookmakers' odds
p/(1-p)
boot
package for bootstrap
boot.ci
bootstrap with glm
confidence intervals from the boot object
in regression
non-linear regression
boot package
in regression
bootstrap
a family of non-linear regressions
introduction
jackknife after bootstrap
sample(replace=T)
with glm
with regression
with single samples
border = NULL
cross-hatching
bordered lines
different colours
both axes log scale
log="xy"
both points and lines
type="b"
bottom (the x axis)
axis = 1
margin = 1
bound symbols
introduction
bounded response
proportion data
box
boxcol
boxfill
boxlty
boxlwd
box-and-whisker plots
binary response variable
bwplot
competition experiment
full colour control
in one-way ANOVA
introduction
notches
single samples
variance components analysis
boxcol
line colour
Box–Cox
transformations
boxes around plots
bty
boxfill
fill colour
boxlty
line type
boxlwd
line width
boxplot
notch=T
one-way ANOVA
OrchardSprays
ordered names
break(s)
bin widths
edge effects in spatial simulations
for count data
to leave a repeat loop
to specify the bins of a histogram, 224–5
bty
boxes around plots
bubble plot
introduction
bubbles
using cex
BUGS
Bayesian inference Using Gibbs Sampling
overdispersed binomial example
regression example
temporal pseudoreplication example
butt
ends of lines
bwplot
box-and-whisker plots
illustration
panel plots
by
dataframe summary
equivalent of ANCOVA in gam
for summarizing dataframes
model fitting within categories
multiple comparisons
sequence generation
by.x
merging dataframes
by.y
merging dataframes
byrow=F
argument to the matrix function
bzfile
connections
c
concatenate character strings
concatenation
creating vector of numbers
C
cubic contrasts
cubic terms
C+
interface to compiled code
calculated values in expressions
as.expression(substitute)
calculations
introduction
calculations with dates and times
calculus
introduction
call
str of linear model
canonical link functions
glm
captial letters
toupper
car
installed package
car package
data ellipse
carriage return
"\r"
case sampling
bootstrap
case sensitive
variable names in R
cat
formatted output
categorical explanatory variables
analysis of variance
classification trees
with count data
categorical variables
background
factor
plotting
cauchy
Cauchy distribution
Cauchy distribution
cauchy
introduction
cbind
add columns to a matrix or dataframe
adding a column to a dataframe
famous five
multiple response variables
response object for glm with binomial errors
cdplot
parasite data
ceiling
next integer
censoring
background
examples
introduction
predicted mean age at death
censoring indicator
introduction
central
different measures of central tendency
central limit theorem
dice game
introduction
centred text (the default)
par(adj=0.5)
cex
character expansion (text size)
determines the size of plotting characters pch
names on maps
size of plotting symbol
stands for character expansion (relative to 1)
cex.axis
determines the size of the axis numbers
cex.lab
determines the size of the text labels on the axes
changing the look of panel plots
panel function
channel
Data Source Name
odbcConnect
chaos
period doubling route
population dynamics
simulation models
character
class
what with scan
worms
character counting in words
{n}
character expansion
cex
characteristic equation
character matching
charmatch
character rotation
srt
character strings
%in%
collapse
in dataframes
introduction
regexpr
remove quotes from character strings
reverse a character string
which
with read.table
character to numeric
coercion
characters in a string
nchar
charmatch
character matching
charplot
function
checking the dataframe
checking the model
background
Chemometrics and Computational Physics
task views
chisq
chi-squared distribution
chisq.test
contingency tables
matrix of Mendel's peas
table objects
two-category table
unequal probabilities
chisq.test(rescale.p=TRUE)
Mendel's peas
chi-squared
chisq
hypothesis testing
special case of the Gamma distribution
chi squared contingency tables
introduction
chi squared distribution
choice of test
simplest is best
choose(n,x)
binomial coefficients n!/(x! (n – x)!)
choosing the right test
introduction
CI
see confidence interval
ci95
function for 95% confidence intervals
circle, 2 pi radians
function to create a circular polygon
points on random radii
circled points
highlighting
circles
drawing bubble plots
citation
of R in written work
Clark and Evans
Test for complete spatial randomness
class
character
complex
dates and times
factor
integer
list
logical
numeric
of a matrix
raw
Sys.time
vector
classification trees
categorical explanatory variables
partition.tree
class knn
identities of the k nearest neighbours
class lw
weights list object
class nb
neighbour file
class of time series objects
class polylist
polygon lists
polygons defining the outlines of regions on a map
Clinical Trial Design, Monitoring, and Analysis
task views
clipboard
connections
writeClipboard
closely packed
multipe graphs
closest
function to find the closest value in a vector
closest values
with which and abs
cloud
panel plots
three-dimensional scatterplots
clumping parameter of the negative binomial
k
cluster analysis
introduction
Cluster Analysis & Finite Mixture Models
task views
clustering
spatial point processes
cm.colors
illustration
coda
package for MCMC output
Codd, E.F.
relational database design
coef
extracting information from model objects
for model objects
with lapply
coefficient of determination
introduction to r2
coefficients
solving linear equations
str of linear model
coercion
as.character
as.complex
as.data.frame
as.difftime
as.integer
as.numeric
background
computing new factor levels
failure gives NA
logical arithmetic
piecewise regression
with logical subscripts
Cohen–Friendly association plot
assocplot
cohort effects and age effects
longitudinal data
col
colour for plotting symbols
subscripts to groups in matrices
col.axis
colour to be used for axis annotation
col.lab
colour to be used for x and y labels
col.main
colour to be used for plot main titles
col.names=F
with write.table
col.sub
colour to be used for plot subtitles
col=grey
grey scale as an alternative to colour in barplots
colatitude
persp
collapse
create a single character string
with paste
collapsing a contingency table
dangers involved
collinearity
multiple regression
colMeans
colMeans(x) column means of dataframe or matrix x
colnames
names for the columns in a matrix
naming columns of a matrix
colors()
see all the colours used by R
colour
changing screen default settings
contrasting points on graphs
factor levels for plotting
fitted values with ANCOVA
in legends
introduction
plots with many variables
plotting symbol
RColorBrewer package
staplecol
whiskcol
colour control
box-and-whisker
coloured plotting symbols with contrasting margins
illustration
pch=21 to pch=26
coloured points
coloured symbols
colouring under a curve
polygon
colour in legends
barplot
fill
colour numbers
illustration
colour of the fill of the plotting symbol
outbg
colour of the outline of the plotting symbol
outcol
colours in R
hexadecimal string of the form #rrggbb
palette()[i]
colours showing around edges
illustration
colour with curved shapes
polygon
colSums
tables of proportions
colSums(x)
column totals of dataframe or matrix x
column
removing a column using subscripts
second subscript
column added to a dataframe
cbind
columns and rows
tapply
column and row totals
dangers involved in contingency tables
margins of contingency tables
columns
select from dataframe
comparisons across columns using max.col
columns of a dataframe
selecting by name
using subscripts
column sums using apply
column-wise
default data entry for matrix
combinatorial formula
binomial coefficients
comma
as decimal point
comma delimited files
read.csv
using scan
command line
versus scripts
comment lines in R code
#
comparing data with a Poisson distribution
example
comparing Michaelis–Menten and asymptotic exponential
nonlinear regression
comparing two distributions
Kolmogorov–Smirnov
comparing two variances
Fisher's F
var.test
competition
error.bars
competition experiment
competitive exclusion
compiled code
.Call
.External
.Internal
.Primitive
complementary log-log link
binary response variable
complete.cases
check for rows with NA
complete spatial randomness
Clark and Evans test
CSR
complex
class
what with scan
complex contingency table
Schoener's lizards
complex files
using scan
complex mathematical expressions
plotmath
complex numbers
Arg
Conj
Im
introduction
Mod
Re
complicated error structures
mixed effects models
complicated formatting of axis labels
expression
component selection
$
Comprehensive R Archive Network
CRAN
Computational Econometrics
task views
computing new factor levels
factors
concatenate
use c to create a vector
concatenation
create a vector of numbers
slowness of
conditional probability
conditioning plots
coplot
multiple plotting panels
panel plots
confidence interval
as error bars
boot.ci
introduction
predicted values in linear regression
probability of parameter value
sample variance
Student's t test
what CI is, and is not
confidence interval by bootstrap
quantile
confidence intervals from the boot object
boot.ci
confint
for the parameters of a model object
Conj
conjugate of complex number
conjugate priors
Bayesian statistics
connections
introduction
connections: error messages
stderr
connections: input
stdin
connections: output
stdout
conservative tests
comparing t test and Wilcoxon test
constancy of variance
square root of the response
constant coefficient of variation data
Gamma errors
constant variance
in one-way ANOVA
linear regression assumptions
test before ANOVA
constrained margins
contingency tables
constant risk of death
Type II survivorship
contingency data
conversion to proportion data
contingency table analysis
main effects are meaningless nuisance variables
update and anova
contingency tables
background
dangers involved
d.f.
introduction
observed and expected
plot methods
Schoener's lizards as an example of a complex contingency table
contingency tables of intermediate complexity
continuation character
+
continuous explanatory variable
binary response variable
linear regression
continuous to categorical variable
cut
ifelse
continuous variables
background
contour
three-dimensional plots
contour plots
contourplot
contour(add=T)
illustration
contourplot
contour plots
panel plots
contr.helmert
in ANCOVA
contr.sum
contr.treatment
contrast coefficients
introduction
contrast sum of squares
contrasts
in ANCOVA
in one-way ANOVA
introduction
multiple comparisons
orthogonal polynomial contrasts
planned comparisons
standard error of the difference between two means
three kinds compared
contrasts=c("contr.helmert","contr.poly")
Helmert contrasts
contrasts=c("contr.sum","contr.poly")
sum contrasts
contrasts=c("contr.treatment","contr.poly")
treatment contrasts
convex hull
colour fill
Cook's distance
model checking
coplot
ethanol data
graphics for mixed effects models
introduction
species with productivity
cor(x,y)
correlation between vectors x and y
cor.test
non-parametric tests of correlation
species with productivity
corAR1
non-linear time series models
corExp
exponential spatial correlation
corGaus
Gaussian spatial correlation
corLin
linear spatial correlation
corRatio
rational quadratic spatial correlation
corrected sums of products
corrected sums of squares
correction factor
matrix notation
correlated explanatory variables
non-orthogonal data
correlation
and variance
and covariance
at different lags
background
between polynomial terms
dredging for significance
partial
scale-dependent correlations
shared common cause
variance of a difference
correlation between explanatory variables
multiple regression
correlation coefficient
cor(x,y)
from SSXY
in terms of variances
correlation is not causation
scatterplots
correlation of explanatory variable(s)
intrinsic aliasing
multiple regression
correlations
multiple time series
switch off in lmer output
correlations in lmer output
suppressing correlations using print(cor=F)
correlation structure
time series analysis
correlogram
illustration
introduction
corSpher
spherical spatial correlation
corSymm
general correlation matrix
cos
cosine in radians
drawing bubble plots
introduction
polynomial approximation
cosine in radians
cos
cost–complexity measure
model simplification in tree models
count characters
table
count data
ANCOVA
background
contingency tables
generalized linear mixed models
introduction
Poisson distribution
Poisson errors
regression
strictly bounded
count data in tables
introduction
count data on proportions
successes and failures
counting missing values
table
counting specific characters
gregexpr
counting things on maps
cut(right=FALSE)
counts
tables of counts
counts to proportions
admissions data
count the occurrences of each value
table
coupled map lattice
spatial dynamics of host–parasite interaction
cov(x,y)
covariance
covariance
and correlation
autocorrelation
background
multivariate normal distribution
variance of a difference
covariance of x and y
var(x,y)
Cox proportional hazards model
ANCOVA example
survival analysis
coxph
roaches data
coxph and survreg
comparison on same data
coxph or survreg
model choice
CRAN
Comprehensive R Archive Network
contents
craps
dice game
create a time series object
ts
create character string
paste
create file paths
paste
creating a vector
concatenation
creating labels from factor levels
ifelse
creating level plots (similar to image plots)
levelplot
creating new factors
logical arithmetic
model.matrix
credible interval
Bayesian statistics
highest posterior density
critical value
comparing two variances
contingency tables
critical value of Student's t
qt
critical values for contingency tables
qchisq
criticism
model criticism
crossdist
distances between points in two patterns
cross-hatching
angle = 45
border = NULL
density = NULL
in polygons
instead of colour in barplots
cross tabulations
xtabs for the admissions data
CSR
complete spatial randomness
cube root transformation
Box–Cox
cubic regression spline
generalized additive models
cummax
vector of non-decreasing numbers which are the cumulative maxima of the values in x up to that point
cummin
vector of non-increasing numbers which are the cumulative minima of the values in x up to that point
cumprod
for factorials
vector containing the product of all of the elements up to that point
cumsum
cumulative distribution functions
vector containing the sum of all of the elements up to that point
cumulative distribution function(s)
cumsum
ecdf
Kolmogorov–Smirnov
cumulative probability
p
cumulative probability of chi-squared distribution
pchisq
cumulative probability of Gaussian distribution
pnorm
cumulative probability of Student's t distribution
pt
cumulative probability of the F distribution
pf
current model
definition
current working directory
getwd
curvature
changed by transformation
model checking
multiple regression
test for
curvature in response
generalized additive models
curve
compared with plot
density of the standard normal distribution
draw mathematical functions
curved lines
linear models
nonlinear regression
non-parametric smoothers
predict with model
quadratic terms
curved shapes
polygon
customized palettes
using rgb
cut
continuous to categorical variable
for creating quadrats on a map
function to create bins of specified width
right=FALSE
testing the random number generator
to compute empirical probabilities for plots
to created histogram bins
cycle length
pi ∗2
seasonal data
cycles
Nicholson's blowflies
population dynamics
cyclic time series
sin-cos models
cylindrical or tapered timber
Offsets
D
function for differentiation
probability density
d.f. (degrees of freedom)
ANOVA table for regression
contingency tables
count data from quadrats
efficient regression designs
example split plot
extracting information from summary(model)
in ANCOVA
in factorial experiments
in one-way ANOVA
introduction
mixed effects models
multiple regression
observed vs. expected frequencies
spotting pseudoreplication
Student's t test
d.f. = 0
saturated model
dangers involved in contingency tables
example
dangers of extrapolation
illustration
Daphnia
data file
dashed lines
lty = 2
data
Ancovacontrasts
berks.accdb
bioassay
bloodcells
blowfly
bowens.csv
box
cancer
car.test.frame
cases
catdata
cellcounts
chicks
childfull
classic
clusters
competition
compexp
Daphnia
das
dates
decay
diminish
disease
dups
epilobium
f.test.data
farms
fertilizer
fisher
fishes
fltimes
fol
fungi
gain
gales
gardens
germination
growth
herbicides
houses
induced
infection
ipomopsis
isolation
jaws
kmeansdata
ksdata
lackoffit
lifeforms
light
lizards
logplots
longdata
lynx
manova
map.places.csv
metadata
metadata2
mm
murders
naydf
nested2
nonlinear
occupation
ozone
ozone.data
pa.csv
panels
para
parasites
pgfull
pgr
pHDaphnia
piedata.csv
plotcol
plotfit
pollute
productivity
quine
ragwortmap
ragwortmap2006
rats
reaction
refuge
regdat
regression
roaches
rt
sales
sapdecay
sasilwood
scatter1
seedlings
seedwts
sexratio
SilwoodWeather
skewdata
sleep
smoothing
soaysheep
spatialdata
species
spending.csv
spino
splityield
sslogistic
streams
sweepdata
t.test.data
tabledata
tannin
taxon
taxonomy
temp
temperatures
timber
timereg
trees
trial
twosample
twoseries
vc22outline
weibull.growth
worldfloras
worms
worms.missing
wtable
yield
yields
data()
built-in data sets
view available packages
data.frame
creating a dataframe
for displaying several vectors as columns
producing a shorter summary dataframe
to create column-wise table of vectors
database management systems
DBMS
data dredging
introduction
data editor
data ellipse
illustration
data entry from file
read.table
data entry from keyboard
scan
data exploration
first things first
tree models
dataframe(s)
certain columns
changing the names of the columns
character variables as factors
compared to matrix
comparison of read.table and readLines
complete.cases
converting to a table
dates and times
drop rows using negative subscripts
from column data using stack
head
initial checks
introduction
logical subscripts
match
merging
missing values
NA
producing a shorter summary frame
removing a column using subscripts
removing rows using subscripts
select certain columns
selecting columns in a dataframe
selecting only certain rows
sort
stack
str
strptime
summary
sweep
time differences between rows
unlist
using logical subscripts
using subscripts
write.table
dataframe operations
attach
head
names
tail
view the entire contents
dataframes attached
search
dataframe summary
aggregate
by
summary
data input
using scan
data input from a file
readLines
data input from the web
URL
data inspection
Anscombe's famous data
statistical models
datasets
built-in
data sets in packages
data series
stl
Data Source Name
DSN
dates and times
%c Date and time, locale-specific
%x Date, locale-specific
class
dataframe rows
differences between two dates
from component hours, minutes and seconds
in dataframes
introduction
mode
reading data from file
reading from file
regression
sequence generation
sorting
strptime
summary
day of the month
%d Day of the month as decimal number (01–31)
day of the year
%j Day of year as decimal number (0–366)
DBMS
database management systems
dead or alive
proportion data
death rate
hazard
introduction
death risk with age
exponential
extreme value
Gompertz
Makeham
model choice
Rayleigh
Weibull
decay
exponential model
mechanistic model
decimal places
in columns of a matrix
round
decimal point options
declining sequences
using : or seq
decomposition of time series by loess
stl
Deevey survivorship curves
illustration
default parameter
graphics
degree symbol
TEX-like rules
degrees of freedom
see d.f. (see p. 992, above)
degrees to radians
conversion
Delaunay triangulation
Voronoi tesselation
deletion p values
summary.lm tables
deletion tests
model simplification
delimitors in files
demo
demonstration of R function
demonstration of R function
demo
denominator
proportion data
density
density estimation
example split plot
of shading
density = NULL
cross-hatching
density dependent processes
population dynamics
density estimation
introduction
density function
for Fisher's F
Gamma distribution
over a histogram
Weibull distribution
density function of the geometric distribution
dgeom
density function overlay
hist
density of cross hatching
illustration
density.ppp
kernel smoothed density
densityplot
kernel density plots
panel plots
posterior distribution
deparse
drawing bubble plots
introduction
departures from the mean
scale
derivatives
examples
derived variable analysis
dealing with pseudoreplication
DerSimonian and Laird estimate
between-study variance tau-squared
designed experiments
random effects
Design of Experiments (DoE) & Analysis of Experimental Data
task views
design plots
plot.design
deSolve
package for solving differential equations
det
determinant of a matrix
detach
avoid masking
example
remove a dataframe from the search path
detection of thresholds
efficient regression designs
determinant
of a matrix
de-trending
differencing
Nicholson's blowflies
dev.off()
end pdf or postcript session
switch off a pdf or post script file
deviance
Akaike's information criterion
binary response variable
introduction
of a linear regression object
deviance > residual d.f.
overdispersion
deviance formula
binomial
Gamma
Gaussian
inverse Gaussian
Poisson
deviance test
contingency tables
df (for degrees of freedom, see d.f.)
Fisher's F
dgamma
skew
dgeom
density function of the geometric distribution
diag
matrix diagonals
dice
the game of craps
dichotomous key
classification trees
diff
length of vectors
the difference function
difference
power analysis
difference between two variances
difference equation
quadratic map
differences between intercepts
factorial ANCOVA
differences between means
summary.lm
understanding summary.lm
differences between slopes
factorial ANCOVA
differences between successive values of a vector
diff
differences rather than paired t test
difference to be detected
sample size
differencing
de-trending
effects on length
differential equations
introduction
task views
differentiation
introduction
different y axes on the same x axis
difftime
differences between two times or dates
dim, 3-dimensional contingency table
after unlist with readLines
defining a matrix from a vector
dimensions of an array
dimensional arguments
cube root transformation
dimensions of an array
array
dim
dimnames
allocated by list
allocating names to factor levels
argument to the matrix function
removal using as.vector
using paste
dir
view file names
dirname
file paths
discrete probability distributions
introduction
discriminant analysis
dissimilarity matrix
hierarchical cluster analysis
dist
hierarchical cluster analysis
distance
incidence functions
Pythagoras
distance from any location to nearest data point
exactdt
distance in the complex plane
Mod
distance map image
distmap
distance measures
hierarchical cluster analysis
to nearest neighbour
to nearest random point
distance to edge of plotting region
pmin
distances between all pairs of points
pairdist
distances between points in two patterns
crossdist
distmap
distance map image
distribution
comparing two distributions
diverging colours
RColorBrewer package
division
/
dizygotic twins
probabilities
DLL
dyn.load
dynamically loadable libraries
dlnorm
density function of the log normal
dlogis
logistic compared to normal
dnbinom
density function of a negative binomial
negative binomial distribution
dnorm
curve
density of the standard normal distribution
drawing a smooth curve
graph
dominant eigenvector
dominant species
max.col
dose.p
bioassay
dot "."
anything character with grep
smallest plotting symbol
dot . convention
fit all the explanatory variables
dot-dash line
lty = 4
dot distribution maps
introduction
dot plots
dotplot
dotplot
panel plots
dotted line
lty = 3
draw families of curves
plot(augPred)
drawing a smooth curve through a scatterplot
nonlinear regression
drawing boxes
graphical test of normality
drawing circles
bubble plot
drawing fitted curves
drawing multiple lines
for loops
drawing smooth probability density curve
dredging for significance
drop elements from a vector
negative subscripts
drop=F
keep all the dimensions of a matrix
drop rows
using negative subscripts
drop the header row
DSN
Data Source Name
dummy variables
in one-way ANOVA
duplicated
produce a set of subscripts that would select the duplicated values from an object
duplicate rows in a dataframe
eliminating
duplicates
plots with multiple copies of data points
Durbin Watson
serial correlation in the residuals
durbinWatsonTest
library("car")
dyn.load
dynamically loadable libraries
dynamically loadable libraries
DLL in C or Fortran
dynamics
simulation models
e
exponents for scientific notation
e = 2.71828
base of natural logarithms
each
option for rep
ecdf
empirical cumulative distribution function
edge correction
Ripley's K
edge effects in spatial simulations
break
wrap-around margins
edge of plotting area
edges
counting things on maps
editor
effects
str of linear model
effect size(s)
analysis of variance
background
illustration
in one-way ANOVA
introduction
log(response ratio)
meta-analysis
model.tables
odds ratio
panel plots
plot.design
power analysis
response ratio
risk difference
risk ratio
summary.lm
efficient regression designs
detection of thresholds
replication
spread of x values
tests for non-linearity
eigen
Leslie matrix
eigenvalue
eigenvector
Einstein
quote
eliminating duplicate rows from a dataframe
eliminating pseudoreplication
aggregate
ellipse
illustration
empirical cumulative distribution function
ecdf
Empirical Finance
task views
empirical probabilities
in plots of logistic regression
empirical scale parameter
overdispersion
end of line shape
lend
ending a function
return
ends of lines
butt
round
environment current names
objects
environments
evaluation environment
in R
Epilobium
classification trees
equality of floating point numbers
all.equal
identical
isTRUE
equilibrium behaviour
simulation models
Error
with aov
error.bars
function
function with one-way ANOVA
error bars
arrows angle = 90
arrows code = 3
competition data
introduction
x and y directions
error bars on empirical probabilities
logistic regression
error bars on graphs
error-checking plot
single samples
error checks
plot(y)
error d.f.
spotting pseudoreplication
error rate
multiple comparisons
error recovery
try function
errors
additive or multiplicative
linear regression assumptions
errors correlated
gls
error structures
generalized linear models
pseudoreplication in nested designs and split plots
statistical models
error sum of squares
illustration
errors with read.table
error terms
multiple error terms
pseudoreplication in nested designs and split plots
error variance
efficient regression designs
illustration
in one-way ANOVA
multiple error terms
summary.aov
Error with aov
rats example
esoph
built-in dataframe
estimation
parameter values from data
estimators
maximum likelihood
ethanol data
humped data
illustration
panel plots
evaluation environment
evaluation frame
even numbers
modulo %%
subscripts from a vector
exact binomial test
binom.test
exactdt
distance from any location to nearest data point
exact mean
generating random numbers
example
worked examples of function
examples of function
example
Excel readable file from R
exp
antilog base e
exponential
for geometric mean
polynomial approximation
Ricker curves
smooth line from a log-linear model
expand.grid
introduction
expanding a dataframe
subscripts
expanding a table into a dataframe
lapply
expectation
Bernoulli distribution
expectation of the vector product
covariance
expected values from chisq.test
experimental design
randomization is better than ANCOVA
randomization using sample
experiments
factorials
explained variation in ANOVA
SSA
explained variation in regression
SSR
explanatory variables and principal components
illustration
explanatory variable(s)
choosing the right test
error bars in x and y directions
interaction
log transformation
optimal transformation
exponential
asymptotic function
death risk with age
exp
special case of the gamma distribution
exponential decay
example
mechanistic model
exponential distribution
illustration
introduction
pdf for mortality data
exponential errors
survreg
useful with data on time to death
exponential function
introduction
exponential growth
Leslie matrix
exponential spatial correlation
corExp
exponents
introduction
large and small numbers
expression
complicated formatting of axis labels
introduction
mathematical and other symbols on plots
produce more complex titles
extinction rate in metapopulation models
extracting information
model objects
extracting information using list subscripts [[]]
summary.aov
summary.lm
extract part of a character string
gsub
regexpr
substr
substring
extrapolation
dangers of
issues with polynomials
extreme cases
Fisher's exact test
extreme value
death risk with age
extrinsic aliasing
introduction
eye colour
contingency tables
F
Fisher's F
hypothesis testing
variance ratio test
factanal
factor analysis
factor
as.numeric
categorical variables
class factor
contrast attributes
declaring numbers as factors
display the levels of a factor
generating factor levels
mode numeric
nlevels
non-alphabetic ordering the levels
numerical factor levels
plotting
text in dataframes
factor analysis
factanal
introduction
plots
factorial
binomial distribution
Fisher's exact test
gamma(x+1)
introduction
relation to gamma function
writing a function
x! = x × (x − 1) × (x − 2)×· · ·×3 × 2
factorial ANCOVA
summary.lm
factorial experiments
ANCOVA
expand.grid
interaction plots
introduction
main effects
plot.design
factor level generation
gl
factor level names
dimnames
factor level reduction
binary response variable
logical arithmetic
model simplification
model simplification in ANCOVA
factor levels
calculation using logical arithmetic
computing new factor levels
create using :
creation using rep
expand.grid
interactions
levels gets
non-alphabetic order
producing a shorter summary dataframe
factor levels for plotting
heat.colors
order
using colour palettes
factor levels to labels
ifelse
factor(ordered=FALSE)
un-order an ordered factor
factors
analysis of variance
background
creating factor names using :
creating new factors with logical arithmetic
from continuous variables
levels to numbers with unclass
ordered factor levels
plotting
reverse sorting
factors and character strings
using all.equal
factors in a dataframe
levels
worms
failure
Bernoulli distribution
binary response variable
try function
fair dice
chisq.test
FALSE
coerces to zero
FALSE and TRUE
combinations of values
falsifiable null hypothesis
independence in contingency tables
families of curves
nlsList
plot(augPred)
family
specify the error structure in a glm
familywise error rate
multiple comparisons
famous five
background
in ANCOVA
matrix multiplication
FAQ
about R
fat arrows function
introduction
fat tails
Cauchy distribution
t compared with normal
fdr
multiple comparisons
fertilizer
example split plot
Fibonacci series
function using while
fig
split the plotting region
file
connections
reading dates and times
saving a list
saving graphics
file.exists
check existence
file.path
file paths
file delimitors
file name
file.exists
paste
file paths
dirname
file.path
introduction
paste
setwd
fill
colour in barplot legend
colour in legends
legend in a double barplot
fill colour
boxfill
filled.contour
illustration
three-dimensional plots
find
locate a package
find nearest neighbours
nnwhich
first character with grep
∧
first-order autoregressive process
time series
first-order compartment
non-linear models
first-order compartment model
SSfol
first-order neighbours
definition
first-order non-linear difference equation
quadratic map
first subscript
row
first things first
data exploration
fisher.test
Fisher's exact test
matrix of Mendel's peas
Fisher's exact test
contingency tables
fisher.test
Fisher's F distribution
distribution
F
shape of the density function
Fisher's F test
comparing two variances
var.test
fit
measuring the degree of scatter using r2
fit all the explanatory variables
dot . convention
fit perfect
saturated model
fitted
extracting information from model objects
for model objects
fitted values
patterns in residuals
str of linear model
fitted values and residuals
model-checking plot
fivenum
for residuals
summary for single samples
Tukey's five number summary
fix
data editing function
fixed
lme
fixed effects
background
introduction
fixed-effect meta-analysis of scaled differences
example
fixed or random
deciding on categorical variables
fixed versus random effects
meta-analysis
flat tables for output
ftable
fligner.test
comparing several variances
comparing two variances
test before ANOVA
Fligner–Killeen test
comparing several variances
floor
greatest integer less than
fluctuations
advantages of logarithms
font
changing screen default settings
font.axis
font to be used for axis annotation
font.lab
font to be used for x and y labels
font.main
font to be used for plot main titles
font.sub
font to be used for plot subtitles
font families for text
HersheySymbol
mono
sans
serif
font to be used for axis annotation
font.axis
font to be used for plot main titles
font.main
font to be used for plot subtitles
font.sub
font to be used for x and y labels
font.lab
foreground colours
axes and boxes
forest
forest plot
forest plot
forest
output from meta-analysis
random-effects meta-analysis of binary data
F or FALSE
for loop
drawing multiple lines
introduction
population dynamics
with sapply for simulating dynamics
form feed
"\f"
form=∼latitude+longitude
spatial errors in gls
format
complex mathematical expressions
for input and output
formatted output
cat
formatting of axis labels with complex characters
expression
formulae
model specification
Fortran
interface to compiled code
fourfoldplot
UCBAadmissions
four parameter
logistic
four-parameter logistic model
SSfpl
fractional powers
introduction
fractions
TEX-like rules
frame
environments in R
evaluation frame
F ratio
ANOVA table for regression
extracting from summary(model)
freedom
see d.f.
frequencies
comparing data with a Poisson distribution
contingency tables
count data
frequency domain
spectral analysis
frequentist approach
likelihood of the data given our model
maximum likelihood
from
sequence generation
the name of the table containing related variables in SQL
ftable, 3-dimensional contingency table
flat tables for output
Schoener's lizards
with the quine data
F test
in one-way ANOVA
introduction
function
anonymous functions
central
charplot
ci95
draw using curve
error.bars
exit using stop
factorial
harmonic mean
introduction
lists for arbitrary arguments
many.means
returning values from
standard error of a mean
switch
variance
vector functions
xy.error.bars
functions worked examples
example