[Vegan-commits] r2332 - in pkg/vegan: . R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Nov 30 10:17:54 CET 2012
Author: jarioksa
Date: 2012-11-30 10:17:54 +0100 (Fri, 30 Nov 2012)
New Revision: 2332
Modified:
pkg/vegan/NAMESPACE
pkg/vegan/R/plot.nestedtemp.R
pkg/vegan/inst/ChangeLog
pkg/vegan/man/nestedtemp.Rd
Log:
add plot.nestednodf()
Modified: pkg/vegan/NAMESPACE
===================================================================
--- pkg/vegan/NAMESPACE 2012-11-25 18:29:25 UTC (rev 2331)
+++ pkg/vegan/NAMESPACE 2012-11-30 09:17:54 UTC (rev 2332)
@@ -252,6 +252,7 @@
S3method(plot, meandist)
S3method(plot, metaMDS)
S3method(plot, monoMDS)
+S3method(plot, nestednodf)
S3method(plot, nestedtemp)
S3method(plot, ordisurf)
S3method(plot, orditkplot)
Modified: pkg/vegan/R/plot.nestedtemp.R
===================================================================
--- pkg/vegan/R/plot.nestedtemp.R 2012-11-25 18:29:25 UTC (rev 2331)
+++ pkg/vegan/R/plot.nestedtemp.R 2012-11-30 09:17:54 UTC (rev 2332)
@@ -1,3 +1,8 @@
+### plot() methods for those nested* functions that return sufficient
+### data to draw a plot. We display a plot using image() with coloured
+### rectangles for occurrences or colours dependent on the
+### contribution to the nestedness when appropriate.
+
`plot.nestedtemp` <-
function (x, kind = c("temperature", "incidence"),
col = rev(heat.colors(100)), names = FALSE,
@@ -22,3 +27,24 @@
las = 2, ...)
}
}
+
+`plot.nestednodf` <-
+ function(x, col = "red", names = FALSE, ...)
+{
+ z <- x$comm
+ z <- t(z[nrow(z):1,])
+ if (length(col) == 1)
+ col <- c(NA, col)
+ image(z, axes = FALSE, col = col, ...)
+ box()
+ if (length(names) == 1)
+ names <- rep(names, 2)
+ if (names[1]) {
+ axis(2, at = seq(1, 0, len = ncol(z)), labels = rev(colnames(z)),
+ las = 2, ...)
+ }
+ if (names[2]) {
+ axis(3, at = seq(0, 1, len = nrow(z)), labels = rownames(z),
+ las = 2, ...)
+ }
+}
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2012-11-25 18:29:25 UTC (rev 2331)
+++ pkg/vegan/inst/ChangeLog 2012-11-30 09:17:54 UTC (rev 2332)
@@ -4,6 +4,9 @@
Version 2.1-22 (opened November 19, 2012)
+ * nestednodf: added plot() method modelled after
+ plot.nestedtemp().
+
* ordiR2step: gained argument 'R2scope' (default TRUE) which can
be used to turn off the criterion of stopping when the adj-R2 of
the current model exceeds that of scope. This option allows model
@@ -11,11 +14,6 @@
predictors higher than number of observations). Pierre Legendre
needed this option for some checks with huge AEM/PCNM scopes.
- It should be checked how the function works with partial RDA: we
- have introduces RsquareAdj() for partial RDA, but the current
- testing still assumes that those models do not have adj-R2 (like
- was the case when ordiR2step() was written).
-
Version 2.1-21 (closed November 19, 2012)
* New version opened with the CRAN release of vegan 2.0-5 on Oct
Modified: pkg/vegan/man/nestedtemp.Rd
===================================================================
--- pkg/vegan/man/nestedtemp.Rd 2012-11-25 18:29:25 UTC (rev 2331)
+++ pkg/vegan/man/nestedtemp.Rd 2012-11-30 09:17:54 UTC (rev 2332)
@@ -8,6 +8,7 @@
\alias{nestedbetasor}
\alias{nestedbetajac}
\alias{plot.nestedtemp}
+\alias{plot.nestednodf}
\title{ Nestedness Indices for Communities of Islands or Patches }
@@ -28,6 +29,7 @@
nestedbetajac(comm)
\method{plot}{nestedtemp}(x, kind = c("temperature", "incidence"),
col=rev(heat.colors(100)), names = FALSE, ...)
+\method{plot}{nestednodf}(x, col = "red", names = FALSE, ...)
}
\arguments{
More information about the Vegan-commits
mailing list