Skip to content
Prev 385 / 7420 Next

output from ordisurf

On Thu, 2008-10-23 at 14:44 -0500, Christopher Chizinski wrote:
Dear Christopher Chizinski,

I assume you mean the ordisurf() function in the vegan package. If you
mean something else, this message is not appropriate and you may stop
reading. 

Function ordisurf (of vegan) returns visibly an object of function gam
of the mgcv package (like documented). You can use all mgcv:::gam tools
to handle this object, including predict.gam (of mgcv) which can be used
to predict new values of surface (z) for any values of the coordinates
(x, y). These results can be exported to SigmaPlot or anywhere. If you
look inside the function ordisurf, you can see how predict.gam is used
to find the predicted value of the surface for a grid of axis values.

I changed the ordisurf function in
http://r-forge.r-project.org/projects/vegan so that it now adds the data
used by the contour() function in a new item called "grid" in the
result. The returned data in "grid" contain vectors "x" and "y" for the
grid values on the axis, and matrix "z" for the fitted surface values
for each combination of "x" and "y" vectors. The values of "z" outside
the convex hull of observed site are marked as NA. You can directly
export these items or reuse them to draw the surface with the contour()
command. The grid item is available from vegan working version 1.16-3
(revision 532) in R-Forge, and Windows binary is available (probably)
from tomorrow morning (Central European Standard Time).

Best wishes, Jari Oksanen