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

> require(elliptic, quietly = TRUE)

Attaching package: 'elliptic'

The following objects are masked from 'package:stats':

    sd, sigma

The following object is masked from 'package:base':

    is.primitive


> n <- 400

> n_BACCO <- 40

> require(elliptic)

> require(emulator)
Loading required package: emulator
Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called 'emulator'

> require(calibrator)
Loading required package: calibrator
Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called 'calibrator'

> z <- 1.9 + (0+1.8i)

> P(z, g = c(1, 0+1i))
[1] -0.550851-2.404205i

> P(z, Omega = c(1, 0+1i))
[1] -12.01771-15.97636i

> maxdiff <- function(x, y) {
+     max(abs(x - y))
+ }

> g <- c(3, 2 + (0+4i))

> z <- seq(from = 1, to = 0.4 + (0+1i), len = 34)

> maxdiff(P(z, g), P.laurent(z, g))
[1] 1.332268e-15

> abs(e18.10.9(parameters(g = g)))
[1] 3.877842e-15 8.881784e-16 2.512148e-15

> jj <- parameters(g = c(1 + (0+1i), 2 - (0+3i)))$Omega

> latplot(jj, xlim = c(-4, 4), ylim = c(-4, 4), xlab = "Re(z)", 
+     ylab = "Im(z)")

> polygon(Re(c(jj[1], sum(jj), jj[2], 0)), Im(c(jj[1], 
+     sum(jj), jj[2], 0)), lwd = 2, col = "gray90", pch = 16, cex = 3)

> kk <- -c(3 * jj[1] + 2 * jj[2], jj[1] + jj[2])

> polygon(Re(c(kk[1], sum(kk), kk[2], 0)), Im(c(kk[1], 
+     sum(kk), kk[2], 0)), lwd = 2, col = "gray30", pch = 16, cex = 3)

> M <- congruence(c(4, 9))

> o <- c(1, 0+1i)

> maxdiff(g.fun(o), g.fun(M %*% o, maxiter = 800))
[1] 1.634621e-13

> u <- function(x) {
+     exp(pi * (0+2i) * x)
+ }

> udash <- function(x) {
+     pi * (0+2i) * exp(pi * (0+2i) * x)
+ }

> Zeta <- function(z) {
+     zeta(z, g)
+ }

> Sigma <- function(z) {
+     sigma(z, g)
+ }

> WeierstrassP <- function(z) {
+     P(z, g)
+ }

> jj <- integrate.contour(Zeta, u, udash)

> maxdiff(jj, 2 * pi * (0+1i))
[1] 2.645453e-16

> abs(integrate.contour(WeierstrassP, u, udash))
[1] 4.965068e-16

> jj.omega <- half.periods(g = c(1 + (0+1i), 2 - (0+3i)))

> x <- seq(from = -4, to = 4, len = n)

> y <- x

> z <- outer(x, (0+1i) * x, "+")

> f <- P(z, c(1 + (0+1i), 2 - (0+3i)))

> png("wp_figure.png", width = 800, height = 800)

> persp(x, y, limit(Re(f)), xlab = "Re(z)", ylab = "Im(z)", 
+     zlab = "Re(P(z))", theta = 30, phi = 30, r = 1e+09, border = NA, 
+     shade = 0.8 .... [TRUNCATED] 

> null <- dev.off()

> png("thallerfig.png", width = 800, height = 800)

> par(pty = "s")

> view(x, y, f, code = 0, real.contour = FALSE, imag.contour = FALSE, 
+     drawlabel = FALSE, col = "red", axes = FALSE, xlab = "Re(z)", 
+     ylab .... [TRUNCATED] 

> axis(1, pos = -4)

> axis(2, pos = -4)

> lines(x = c(-4, 4), y = c(4, 4))

> lines(y = c(-4, 4), x = c(4, 4))

> null <- dev.off()

> x <- seq(from = -12, to = 12, len = n)

> y <- x

> z <- outer(x, (0+1i) * y, "+")

> f <- sigma(z, c(1 + (0+1i), 2 - (0+3i)))

> png("sigma_green.png", width = 800, height = 800)

> par(pty = "s")

> view(x, y, f, scheme = 4, real.contour = FALSE, drawlabels = FALSE, 
+     axes = FALSE, xlab = "Re(z)", ylab = "Im(z)")

> axis(1, pos = -12)

> axis(2, pos = -12)

> lines(x = c(-12, 12), y = c(12, 12))

> lines(y = c(-12, 12), x = c(12, 12))

> lines(x = c(-12, 12), y = -c(12, 12))

> lines(y = c(-12, 12), x = -c(12, 12))

> null <- dev.off()

> zeta.z <- zeta(z, c(1 + (0+1i), 2 - (0+3i)))

> png("zetafig.png", width = 800, height = 800)

> par(pty = "s")

> view(x, y, zeta.z, scheme = 0, real.contour = FALSE, 
+     drawlabels = FALSE, xlab = "Re(z)", ylab = "Im(z)")

> null <- dev.off()

> jj <- seq(from = -40, to = 40, len = n)

> m <- outer(jj, (0+1i) * jj, "+")

> f <- sn(u = 5 - (0+2i), m = m, maxiter = 1000)

> png("sn_figure.png", width = 800, height = 800)

> par(pty = "s")

> view(jj, jj, f, scheme = 0, r0 = 1/5, real = T, imag = F, 
+     levels = c(0, -0.4, -1), drawlabels = F, xlab = "Re(m)", 
+     ylab = "Im(m)")

> null <- dev.off()

> f <- function(z) {
+     (0+1i) * z^2
+ }

> x <- seq(from = -6, to = 6, len = n)

> y <- seq(from = -6, to = 6, len = n)

> z <- outer(x, (0+1i) * y, "+")

> png("stag_point.png", width = 800, height = 800)

> par(pty = "s")

> view(x, y, f(z), nlevels = 14, imag.contour = TRUE, 
+     real.cont = TRUE, scheme = -1, drawlabels = FALSE, axes = FALSE, 
+     xlab = "Re(z)", y .... [TRUNCATED] 

> axis(1, pos = -6)

> axis(2, pos = -6)

> lines(x = c(-6, 6), y = c(6, 6))

> lines(y = c(-6, 6), x = c(6, 6))

> d1 <- c(-0.1, 0, 0.1)

> d2 <- c(0.1, 0, 0.1)

> lines(x = d1, y = 1 + d2)

> lines(x = d1, y = -1 - d2)

> lines(x = 1 - d2, y = d1)

> lines(x = -1 + d2, y = d1)

> null <- dev.off()

> f <- function(z) {
+     (0+1i) * log((z - 1.7 + (0+3i)) * (z - 1.7 - (0+3i))/(z + 
+         1 - (0+0.6i))/(z + 1 + (0+0.6i)))
+ }

> x <- seq(from = -6, to = 6, len = n)

> y <- seq(from = -6, to = 6, len = n)

> z <- outer(x, (0+1i) * y, "+")

> png("two_sources_two_sinks.png", width = 800, height = 800)

> par(pty = "s")

> view(x, y, f(z), nlevels = 24, imag.contour = TRUE, 
+     real.cont = TRUE, scheme = 17, power = 0.1, drawlabels = FALSE, 
+     axes = FALSE, xlab .... [TRUNCATED] 

> axis(1, pos = -6)

> axis(2, pos = -6)

> lines(x = c(-6, 6), y = c(6, 6))

> lines(y = c(-6, 6), x = c(6, 6))

> null <- dev.off()

> m <- 0.5

> K <- K.fun(m)

> iK <- K.fun(1 - m)

> b <- sn(0 + (0+1i) * iK/2, m = m)

> a <- 1

> f <- function(z) {
+     (0+1i) * log((z - a) * (z - Conj(a))/(z - b)/(z - Conj(b)))
+ }

> x <- seq(from = -K, to = K, len = n)

> y <- seq(from = 0, to = iK, len = n)

> z <- outer(x, (0+1i) * y, "+")

> fsn <- f(sn(z, m = m))

> png("rectangle_pot_flow.png", width = 800, height = 800)

> view(x, y, fsn, nlevels = 44, imag.contour = FALSE, 
+     real.cont = TRUE, scheme = 17, power = 0.1, drawlabels = FALSE, 
+     axes = FALSE, xlab .... [TRUNCATED] 

> rect(-K, 0, K, iK, lwd = 3)

> null <- dev.off()

> n <- n_BACCO

> n.code.obs <- 30

> n.field.obs <- 31

> suppressWarnings(RNGversion("3.5.0"))

> set.seed(0)

> latin.hypercube <- function(n, d) {
+     sapply(seq_len(d), function(...) {
+         (sample(1:n) - 0.5)/n
+     })
+ }

> D1.elliptic <- latin.hypercube(n.code.obs, 4)

> colnames(D1.elliptic) <- c("x", "y", "x.sink", "y.sink")

> D1.elliptic[, c(1, 3)] <- (D1.elliptic[, c(1, 3)] - 
+     0.5) * 2

> D2.elliptic <- latin.hypercube(n.field.obs, 2)

> colnames(D2.elliptic) <- c("x", "y")

> D2.elliptic[, 1] <- (D2.elliptic[, 1] - 0.5) * 2

> fluid.speed <- function(x.pos, y.pos, x.sink, y.sink) {
+     a <- 1
+     b <- sn(x.pos/K + (0+1i) * iK * y.pos, m = m)
+     f <- function(z) {
+  .... [TRUNCATED] 

> y.elliptic <- rep(NA, nrow(D1.elliptic))

> for (i in 1:length(y.elliptic)) {
+     jj <- D1.elliptic[i, , drop = TRUE]
+     y.elliptic[i] <- fluid.speed(jj[1], jj[2], jj[3], jj[4])
+ }

> z.elliptic <- rep(NA, nrow(D2.elliptic))

> for (i in 1:length(z.elliptic)) {
+     jj <- D2.elliptic[i, , drop = TRUE]
+     z.elliptic[i] <- fluid.speed(jj[1], jj[2], 0, 0.5)
+ }

> D1 <- round(cbind(D1.elliptic, observation = y.elliptic), 
+     2)

> D2 <- round(cbind(D2.elliptic, observation = z.elliptic), 
+     2)

> d.elliptic <- c(y.elliptic, z.elliptic)

> h1.elliptic <- function(x) {
+     out <- c(1, x[1])
+ }

> H1.elliptic <- function(D1) {
+     if (is.vector(D1)) {
+         D1 <- t(D1)
+     }
+     out <- t(apply(D1, 1, h1.elliptic))
+     colnames(out) .... [TRUNCATED] 

> h2.elliptic <- function(x) {
+     c(1, x[1])
+ }

> H2.elliptic <- function(D2) {
+     if (is.vector(D2)) {
+         D2 <- t(D2)
+     }
+     out <- t(apply(D2, 1, h2.elliptic))
+     colnames(out) .... [TRUNCATED] 

> extractor.elliptic <- function(D1) {
+     return(list(x.star = D1[, 1:2, drop = FALSE], t.vec = D1[, 
+         3:4, drop = FALSE]))
+ }

> phi.fun.elliptic <- function(rho, lambda, psi1, psi1.apriori, 
+     psi2, psi2.apriori, theta.apriori, power) {
+     "pdm.maker.psi1" <- function( .... [TRUNCATED] 

> jj.psi1 <- c(rep(1, 4), 0.3)

> names(jj.psi1)[1:4] <- colnames(D1.elliptic)

> names(jj.psi1)[5] <- "sigma1squared"

> jj.mean.psi1 <- rep(1, 5)

> names(jj.mean.psi1) <- names(jj.psi1)

> jj.sigma.psi1 <- diag(0.1, nrow = 5)

> rownames(jj.sigma.psi1) <- names(jj.psi1)

> colnames(jj.sigma.psi1) <- names(jj.psi1)

> jj.psi2 <- c(1, 1, 0.3)

> names(jj.psi2)[1:2] <- colnames(D2.elliptic)

> names(jj.psi2)[3] <- "sigma2squared"

> jj.mean.psi2 <- rep(1, 4)

> names(jj.mean.psi2) <- c("x.sink", "y.sink", "rho", 
+     "lambda")

> jj.sigma.psi2 <- diag(0.1, 4)

> rownames(jj.sigma.psi2) <- names(jj.mean.psi2)

> colnames(jj.sigma.psi2) <- names(jj.mean.psi2)

> jj.mean.th <- c(1, 0.5)

> names(jj.mean.th) <- colnames(D1.elliptic)[3:4]

> jj.sigma.th <- diag(rep(1, 2))

> rownames(jj.sigma.th) <- colnames(D1.elliptic)[3:4]

> colnames(jj.sigma.th) <- colnames(D1.elliptic)[3:4]

> phi.elliptic <- phi.fun.elliptic(rho = 1, lambda = 0.1, 
+     psi1 = jj.psi1, psi2 = jj.psi2, psi1.apriori = list(mean = jj.mean.psi1, 
+         s .... [TRUNCATED] 

> E.theta.elliptic <- function(D2 = NULL, H1 = NULL, 
+     x1 = NULL, x2 = NULL, phi, give.mean = TRUE) {
+     if (give.mean) {
+         m_theta <- .... [TRUNCATED] 

> Edash.theta.elliptic <- function(x, t.vec, k, H1, 
+     fast.but.opaque = FALSE, a = NULL, b = NULL, phi = NULL) {
+     if (fast.but.opaque) {
+   .... [TRUNCATED] 

> maximum.likelihood.support <- p.eqn8.supp(theta = c(0, 
+     1/2), D1 = D1.elliptic, D2 = D2.elliptic, H1 = H1.elliptic, 
+     H2 = H2.elliptic, d .... [TRUNCATED] 

  When sourcing 'ellipticpaper.R':
Error: could not find function "p.eqn8.supp"
Execution halted

  'ellipticpaper.Rnw'... failed
  'residuetheorem.Rnw'... OK