[Vegan-commits] r532 - in pkg: . R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 27 09:02:55 CET 2008
Author: jarioksa
Date: 2008-10-27 09:02:55 +0100 (Mon, 27 Oct 2008)
New Revision: 532
Modified:
pkg/DESCRIPTION
pkg/R/ordisurf.R
pkg/inst/ChangeLog
pkg/man/ordisurf.Rd
Log:
ordisurf: returns a mgcv:::gam object amended with item 'grid' containing x, y and z values used by contour() for the surface
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2008-10-22 03:47:43 UTC (rev 531)
+++ pkg/DESCRIPTION 2008-10-27 08:02:55 UTC (rev 532)
@@ -1,7 +1,7 @@
Package: vegan
Title: Community Ecology Package
-Version: 1.16-2
-Date: October 21, 2008
+Version: 1.16-3
+Date: October 27, 2008
Author: Jari Oksanen, Roeland Kindt, Pierre Legendre, Bob O'Hara, Gavin L. Simpson,
Peter Solymos, M. Henry H. Stevens, Helene Wagner
Maintainer: Jari Oksanen <jari.oksanen at oulu.fi>
Modified: pkg/R/ordisurf.R
===================================================================
--- pkg/R/ordisurf.R 2008-10-22 03:47:43 UTC (rev 531)
+++ pkg/R/ordisurf.R 2008-10-27 08:02:55 UTC (rev 532)
@@ -45,5 +45,7 @@
contour(xn1, xn2, matrix(fit, nrow=GRID), col = col, add = TRUE,
levels = levels, labcex = labcex,
drawlabels = !is.null(labcex) && labcex > 0)
+ mod$grid <- list(x = xn1, y = xn2, z = matrix(fit, nrow = GRID))
+ class(mod) <- c("ordisurf", class(mod))
return(mod)
}
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2008-10-22 03:47:43 UTC (rev 531)
+++ pkg/inst/ChangeLog 2008-10-27 08:02:55 UTC (rev 532)
@@ -2,15 +2,18 @@
VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
-Version 1.16-2 (opened October 10, 2008)
+Version 1.16-3 (opened October 27, 2008)
+ * ordisurf: returns x, y and z used by contour() following a query
+ "[R-sig-eco] output from ordisurf" on Oct 23, 2008.
+
+Version 1.16-2 (closed October 27, 2008) --- for Annukka
+
* beals: replaced old beals.R with the new code by Miquel de
Caceres with new methods described in De Caceres & Legendre
(Oecologia 156, 657-669; 2008). This also implements the
cross-validatory Beals of Munzbergova & Herben (Oikos 104,
- 408-414; 2004) plus many new options of unbiasing estimates. In
- addition to new beals, there is a function for bealsing only one
- target species.
+ 408-414; 2004) plus many new options of unbiasing estimates.
* permatfull: bug of row/col marins is fixed, shuffle argument is
added to enable individual and sample based randomisation of count
Modified: pkg/man/ordisurf.Rd
===================================================================
--- pkg/man/ordisurf.Rd 2008-10-22 03:47:43 UTC (rev 531)
+++ pkg/man/ordisurf.Rd 2008-10-27 08:02:55 UTC (rev 532)
@@ -56,10 +56,21 @@
accordance with constrained \code{\link{cca}}, you should set
\code{display = "lc"} (and possibly \code{scaling = 2}).
}
+
\value{
- Function is usually called for its side effect of drawing the contour
- plot, but it returns the result object of \code{\link[mgcv]{gam}}.
+ Function is usually called for its side effect of drawing the
+ contour plot. The function returns the result object of class
+ \code{"ordisurf"} that inherits from \code{\link[mgcv]{gam}} used
+ internally to fit the surface, but adds an item \code{grid} that
+ contains the data for the grid surface. The item \code{grid} has
+ elements \code{x} and \code{y} which are vectors of axis coordinates,
+ and element \code{z} that is a matrix of fitted values for
+ \code{\link{contour}}. The values outside the convex hull of observed
+ points are \code{NA} in \code{z}. The \code{\link[mgcv]{gam}}
+ component of the result can be used for further analysis like
+ predicting new values (see \code{\link[mgcv]{predict.gam}}).
}
+
\author{ Dave Roberts and Jari Oksanen }
\note{
The default is to use thinplate splines. These make sense in
More information about the Vegan-commits
mailing list