[Vegan-commits] r234 - in branches/1.11-0: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Feb 19 15:36:08 CET 2008
Author: jarioksa
Date: 2008-02-19 15:36:08 +0100 (Tue, 19 Feb 2008)
New Revision: 234
Removed:
branches/1.11-0/R/nestedtemp.R
branches/1.11-0/R/plot.nestedtemp.R
branches/1.11-0/R/print.nestedtemp.R
Modified:
branches/1.11-0/inst/NEWS
branches/1.11-0/man/oecosimu.Rd
Log:
Removed nestedtemp from the release branch
Deleted: branches/1.11-0/R/nestedtemp.R
===================================================================
--- branches/1.11-0/R/nestedtemp.R 2008-02-19 09:38:29 UTC (rev 233)
+++ branches/1.11-0/R/nestedtemp.R 2008-02-19 14:36:08 UTC (rev 234)
@@ -1,46 +0,0 @@
-`nestedtemp` <-
- function(comm, ...)
-{
- comm <- ifelse(comm > 0, 1, 0)
- rs <- rowSums(comm)
- cs <- colSums(comm)
- r <- (rank(-rs, ties="aver") - 0.5)/(nrow(comm))
- c <- (rank(-cs, ties="aver") - 0.5)/(ncol(comm))
- dis <- outer(r, c, pmin)
- totdis <- 1 - abs(outer(r, c, "-"))
- fill <- sum(comm)/prod(dim(comm))
- ## Move each point to a diagonal, xy will be the x-coordinate
- xy <- (outer(r, c, "+") - 1)/2
- xy <- sweep(-xy, 1, r, "+")
- ## Fill line as a parabola against the diagonal. The argument is
- ## 0..1 (x-coordinate) instead of diagonal value 0..sqrt(2).
- ## fill is found from the parent environment.
- if (fill < 1/6) {
- ## If fill < 1/6, parabola will go over the borders
- parfun <- function(x) pmin((0.5-fill)*x, (1-x)*(0.5-fill))*2
- } else {
- ## The equation below really is a parabola, but in Horner form.
- parfun <- function(x) {
- out <- 3*(0.5-fill)*sqrt(2)*x*(1-x)
- out/sqrt(2)
- }
- }
- out <- pmin(xy, 1-xy) - parfun(xy)
- ## Filline
- x <- seq(0,1,len=21)
- xline <- parfun(x)
- smo <- list(x = x - xline, y = (1-x) - xline)
- u <- (dis - out)/totdis
- u[u < 0 & comm == 1] <- 0
- u[u > 0 & comm == 0] <- 0
- u <- u^2
- colnames(u) <- colnames(comm)
- rownames(u) <- rownames(comm)
- temp <- 100*sum(u)/prod(dim(comm))/0.04145
- i <- rev(order(rs))
- j <- rev(order(cs))
- out <- list(comm = comm[i,j], u = u[i,j], fill=fill, statistic = temp,
- smooth=smo)
- class(out) <- "nestedtemp"
- out
-}
Deleted: branches/1.11-0/R/plot.nestedtemp.R
===================================================================
--- branches/1.11-0/R/plot.nestedtemp.R 2008-02-19 09:38:29 UTC (rev 233)
+++ branches/1.11-0/R/plot.nestedtemp.R 2008-02-19 14:36:08 UTC (rev 234)
@@ -1,13 +0,0 @@
-`plot.nestedtemp` <-
- function (x, kind = c("temperature", "incidendce"), col = rev(heat.colors(100)),
- ...)
-{
- kind <- match.arg(kind)
- if (kind == "temperature")
- z <- x$u
- else z <- x$comm
- z <- t(z[nrow(z):1, ])
- image(z, axes = FALSE, col = col, ...)
- box()
- lines(x$smooth$x, 1-x$smooth$y)
-}
Deleted: branches/1.11-0/R/print.nestedtemp.R
===================================================================
--- branches/1.11-0/R/print.nestedtemp.R 2008-02-19 09:38:29 UTC (rev 233)
+++ branches/1.11-0/R/print.nestedtemp.R 2008-02-19 14:36:08 UTC (rev 234)
@@ -1,8 +0,0 @@
-"print.nestedtemp" <-
-function(x, ...)
-{
- cat("nestedness temperature:", format(x$statistic, ...), "\n")
- cat("with matrix fill", format(x$fill, ...), "\n")
- invisible(x)
-}
-
Modified: branches/1.11-0/inst/NEWS
===================================================================
--- branches/1.11-0/inst/NEWS 2008-02-19 09:38:29 UTC (rev 233)
+++ branches/1.11-0/inst/NEWS 2008-02-19 14:36:08 UTC (rev 234)
@@ -27,9 +27,8 @@
r1, r2, c0, swap, trial swap, backtracking, quasiswap). The
nestedness can be analysed with functions like nestedchecker (number
of checkerboard units), nestedn0 (measure N0), nesteddisc
- (discrepancy), and nestedtemp (matrix temperature), but users can
- supply their own functions or even use some standard R functions
- such as chisq.test.
+ (discrepancy), but users can supply their own functions or even use
+ some standard R functions such as chisq.test.
- ordiresids: similar diagnostic plots as in plot.lm for constrained
ordination: Residuals ~ Fitted, sqrt(abs(Residuals)) ~ Fitted, and
Modified: branches/1.11-0/man/oecosimu.Rd
===================================================================
--- branches/1.11-0/man/oecosimu.Rd 2008-02-19 09:38:29 UTC (rev 233)
+++ branches/1.11-0/man/oecosimu.Rd 2008-02-19 14:36:08 UTC (rev 234)
@@ -4,14 +4,11 @@
\alias{nestedchecker}
\alias{nestedn0}
\alias{nesteddisc}
-\alias{nestedtemp}
\alias{commsimulator}
\alias{print.oecosimu}
\alias{print.nestedchecker}
\alias{print.nestedn0}
\alias{print.nesteddisc}
-\alias{print.nestedtemp}
-\alias{plot.nestedtemp}
\title{ Nestedness and Null Models for Islands or Patches }
\description{
@@ -26,9 +23,6 @@
nestedchecker(comm)
nestedn0(comm)
nesteddisc(comm)
-nestedtemp(comm, ...)
-\method{plot}{nestedtemp}(x, kind = c("temperature", "incidendce"),
- col=rev(heat.colors(100)), ...)
commsimulator(x, method, thin=1)
}
@@ -45,9 +39,7 @@
\item{thin}{Number of discarded null communities between two
evaluations of nestedness statistic in sequential methods
\code{"swap"} and \code{"tswap"}.}
- \item{kind}{The kind of plot produced.}
- \item{x}{Matrix for \code{commsimulator} or a \code{plot} object.}
- \item{col}{Colour scheme for matrix temperatures.}
+ \item{x}{Matrix for \code{commsimulator}.}
\item{\dots}{Other arguments to functions.}
}
@@ -68,18 +60,7 @@
occurs (Patterson & Atmar 1986). Function \code{nesteddisc}
implements discrepancy index which is the number of ones that should
be shifted to fill a row with ones in a table arranged by species
- frequencies (Brualdi & Sanderson 1999). Function \code{nestedtemp}
- finds the matrix temperature which is defined as the sum of
- \dQuote{surprises} in arranged matrix. In arranged unsurprising
- matrix all species within proportion given by matrix fill are in the
- upper left corner of the matrix, and the surprise of the absence or
- presences is the diagonal distance from the fill line (Atmar &
- Patterson 1993). Function \code{nestedtemp} also has a \code{plot}
- method which can display either incidences or temperatures of the
- surprises. Matrix temperature is so vaguely described in the
- literature (Atmar & Patterson 1993) that it may be impossible to
- reproduce the results of other implementations, and the user should
- be cautious in interpreting the results.
+ frequencies (Brualdi & Sanderson 1999).
In addition to these functions provided in \pkg{vegan}, any function
can be used that takes \code{comm} as the first argument, and
@@ -157,10 +138,6 @@
input matrix. }
\references{
- Atmar, W. & Patterson, B.D. (1993). The measurement of order and
- disorder in the distribution of species in fragmented
- habitat. \emph{Oecologia} 96, 373--382.
-
Brualdi, R.A. & Sanderson, J.G. (1999). Nested species subsets, gaps,
and discrepancy. \emph{Oecologia} 119, 256--264.
@@ -224,9 +201,6 @@
\examples{
data(sipoo)
nestedchecker(sipoo)
-mod <- oecosimu(sipoo, nestedtemp, "r00")
-mod
-plot(mod)
## Use the first eigenvalue of correspondence analysis as an index
## of structure: a model for making your own functions.
## This is a minimal structure; fancier functions give fancier results
More information about the Vegan-commits
mailing list