Running examples in 'vegan-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ordisurf
> ### Title: Fit and Plot Smooth Surfaces of Variables on Ordination.
> ### Aliases: ordisurf ordisurf.default ordisurf.formula calibrate.ordisurf
> ###   plot.ordisurf
> ### Keywords: multivariate aplot
> 
> ### ** Examples
> 
> data(varespec)
> data(varechem)
> vare.dist <- vegdist(varespec)
> vare.mds <- monoMDS(vare.dist)
> ordisurf(vare.mds ~ Baresoil, varechem, bubble = 5)

Family: gaussian 
Link function: identity 

Formula:
y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)

Estimated degrees of freedom:
5.63  total = 6.63 

REML score: 92.96761     
> 
> ## as above but without the extra penalties on smooth terms,
> ## and using GCV smoothness selection (old behaviour of `ordisurf()`):
> ordisurf(vare.mds ~ Baresoil, varechem, col = "blue", add = TRUE,
+                         select = FALSE, method = "GCV.Cp")

Family: gaussian 
Link function: identity 

Formula:
y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)

Estimated degrees of freedom:
6.45  total = 7.45 

GCV score: 144.0039     
> 
> ## Cover of Cladina arbuscula
> fit <- ordisurf(vare.mds ~ Cladarbu, varespec, family=quasipoisson)
> ## Get fitted values
> calibrate(fit)
       18        15        24        27        23        19        22        16 
21.254026  5.675259  3.679616  3.898510  9.643821  7.698310  7.729203  9.758046 
       28        13        14        20        25         7         5         6 
 2.743212 29.700556 11.971747  8.310960  5.390564 24.905994 11.007652 25.330656 
        3         4         2         9        12        10        11        21 
 6.520708  9.410616  4.519672  4.090948 11.557930  4.314850 11.693692 14.243453 
> 
> ## Variable selection via additional shrinkage penalties
> ## This allows non-significant smooths to be selected out
> ## of the model not just to a linear surface. There are 2
> ## options available:
> ##  - option 1: `select = TRUE` --- the *default*
> ordisurf(vare.mds ~ Baresoil, varechem, method = "REML", select = TRUE)

Family: gaussian 
Link function: identity 

Formula:
y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)

Estimated degrees of freedom:
5.63  total = 6.63 

REML score: 92.96761     
> ##  - option 2: use a basis with shrinkage
> ordisurf(vare.mds ~ Baresoil, varechem, method = "REML", bs = "ts")

Family: gaussian 
Link function: identity 

Formula:
y ~ s(x1, x2, k = 10, bs = "ts", fx = FALSE)

Estimated degrees of freedom:
4.43  total = 5.43 

REML score: 96.2345     
> ## or bs = "cs" with `isotropic = FALSE`
> 
> ## Plot method
> plot(fit, what = "contour")
> 
> ## Plotting the "gam" object
> plot(fit, what = "gam") ## 'col' and 'cex' not passed on
> ## or via plot.gam directly
> library(mgcv)
Loading required package: nlme
This is mgcv 1.8-30. For overview type 'help("mgcv-package")'.
> plot.gam(fit, cex = 2, pch = 1, col = "blue")
> ## 'col' effects all objects drawn...
> 
> ### controlling the basis functions used
> ## Use Duchon splines
> ordisurf(vare.mds ~ Baresoil, varechem, bs = "ds")

Family: gaussian 
Link function: identity 

Formula:
y ~ s(x1, x2, k = 10, bs = "ds", fx = FALSE)

Estimated degrees of freedom:
5.63  total = 6.63 

REML score: 93.17149     
> 
> ## A fixed degrees of freedom smooth, must use 'select = FALSE'
> ordisurf(vare.mds ~ Baresoil, varechem, knots = 4,
+                         fx = TRUE, select = FALSE)

Family: gaussian 
Link function: identity 

Formula:
y ~ s(x1, x2, k = 4, bs = "tp", fx = TRUE)

Estimated degrees of freedom:
3  total = 4 

REML score: 81.86011     
> 
> ## An anisotropic smoother with cubic regression spline bases
> ordisurf(vare.mds ~ Baresoil, varechem, isotropic = FALSE,
+                         bs = "cr", knots = 4)
Error in .Call(C_mgcv_tmm, X, T, d, m, n) : WEIRD RETURN VALUE: 0x4
Calls: ordisurf ... smooth.construct.tensor.smooth.spec -> tensor.prod.model.matrix
Execution halted