Errors in running code in vignettes:
when running code in 'Rchaeology.Rnw'

> if (exists(".orig.enc")) options(encoding = .orig.enc)

> dir.create("plots", showWarnings = F)

> options(width = 100, continue = "  ")

> options(useFancyQuotes = FALSE)

> set.seed(12345)

> pdf.options(onefile = F, family = "Times", pointsize = 12)

> dat <- data.frame(x1 = rnorm(100, m = 50), x2 = rnorm(100, 
+     m = 50), x3 = rnorm(100, m = 50), x4 = rnorm(100, m = 50), 
+     y = rnorm(100))

> m2 <- lm(y ~ log(x1) + x2 * x3, data = dat)

> suffixX <- function(fmla, x, s) {
+     upform <- as.formula(paste(". ~ .", "-", x, "+", paste(x, 
+         s, sep = ""), sep = ""))
+     update.f .... [TRUNCATED] 

> newFmla <- formula(m2)

> newFmla
y ~ log(x1) + x2 * x3

> suffixX(newFmla, "x2", "c")
y ~ log(x1) + x3 + x2c + x2:x3

> suffixX(newFmla, "x1", "c")
y ~ log(x1) + x2 + x3 + x1c + x2:x3

> newFmla
y ~ log(x1) + x2 * x3

> newFmla[[1]]
`~`

> newFmla[[2]]
y

> newFmla[[3]]
log(x1) + x2 * x3

> newFmla[[3]][[2]]
log(x1)

> newFmla[[3]][[2]][[2]]
x1

> m1 <- lm(y ~ x1 * x2, data = dat)

> coef(m1)
(Intercept)          x1          x2       x1:x2 
296.4693597  -5.7456882  -5.9574971   0.1154519 

> regargs <- list(formula = y ~ x1 * x2, data = quote(dat))

> m2 <- do.call("lm", regargs)

> coef(m2)
(Intercept)          x1          x2       x1:x2 
296.4693597  -5.7456882  -5.9574971   0.1154519 

> all.equal(m1, m2)
[1] TRUE

> m3 <- lm(y ~ x1 * x2, data = dat)

> coef(m3)
(Intercept)          x1          x2       x1:x2 
296.4693597  -5.7456882  -5.9574971   0.1154519 

> mycall <- call("lm", quote(y ~ x1 * x2), data = quote(dat))

> m4 <- eval(mycall)

> coef(m4)
(Intercept)          x1          x2       x1:x2 
296.4693597  -5.7456882  -5.9574971   0.1154519 

> f1 <- y ~ x1 + x2 + x3 + log(x4)

> class(f1)
[1] "formula"

> m5 <- lm(f1, data = dat)

> coef(m5)
(Intercept)          x1          x2          x3     log(x4) 
26.39386649  0.03117335 -0.12593151 -0.01764095 -5.31745509 

> f1[[1]]
`~`

> f1[[2]]
y

> f1[[3]]
x1 + x2 + x3 + log(x4)

> f1[[3]][[1]]
`+`

> f1[[3]][[2]]
x1 + x2 + x3

> f1[[3]][[3]]
log(x4)

> f1exp <- expression(y ~ x1 + x2 + x3 + log(x4))

> class(f1exp)
[1] "expression"

> m6 <- lm(eval(f1exp), data = dat)

> f1expeval <- eval(f1exp)

> class(f1expeval)
[1] "formula"

> all.equal(f1expeval, f1)
[1] TRUE

> m7 <- lm(f1expeval, data = dat)

> all.equal(coef(m5), coef(m6), coef(m7))

  When sourcing 'Rchaeology.R':
Error: length(tolerance) == 1L is not TRUE
Execution halted

  'Rchaeology.Rnw' using 'UTF-8'... failed
  'Rstyle.Rnw' using 'UTF-8'... OK
  'outreg.Rnw' using 'UTF-8'... OK
  'rockchalk.Rnw' using 'UTF-8'... OK