
ordisurf
fits a smooth surface for given variable and
plots the result on ordination diagram.ordisurf(x, y, choices=c(1, 2), knots=10, family="gaussian", col="red",
thinplate = TRUE, add = FALSE, ...)
scores
.gam
(one
more than degrees of freedom).gam
.gam
.gam
.ordisurf
fits a smooth surface using thinplate spline
fitting in gam
, and interpolates the fitted
values into a
regular grid using interp
. Finally, it plots the
results either over an existing ordination diagram or draws a new plot
with sample plots and fitted contours. The function uses
scores
to extract ordination scores, and x
can be
any result object known by that function.gam
,
interp
and scores
. Function
envfit
provides a poorer but more traditional and compact
alternative.## The examples are not run by `example(ordisurf)' because they need
## libraries `mgcv' and `akima' which may not exist in every system.
data(varespec)
data(varechem)
library(MASS)
library(mva)
vare.dist <- vegdist(varespec)
vare.mds <- isoMDS(vare.dist)
attach(varespec)
attach(varechem)
ordisurf(vare.mds, Baresoil, xlab="Dim1", ylab="Dim2")
## Total cover of reindeer lichens
ordisurf(vare.mds, Cla.ste+Cla.arb+Cla.ran, xlab="Dim1", ylab="Dim2")
Run the code above in your browser using DataLab