[Vegan-commits] r1473 - in pkg/vegan: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 31 17:48:14 CET 2011
Author: jarioksa
Date: 2011-01-31 17:48:14 +0100 (Mon, 31 Jan 2011)
New Revision: 1473
Modified:
pkg/vegan/R/prestondistr.R
pkg/vegan/man/fisherfit.Rd
Log:
prestondistr() learnt tiesplit for plots (but this does not influence fit)
Modified: pkg/vegan/R/prestondistr.R
===================================================================
--- pkg/vegan/R/prestondistr.R 2011-01-30 22:09:32 UTC (rev 1472)
+++ pkg/vegan/R/prestondistr.R 2011-01-31 16:48:14 UTC (rev 1473)
@@ -1,4 +1,4 @@
-"prestondistr" <-
+`prestondistr` <-
function (x, truncate = -1, ...)
{
fun <- function(par, x, truncate) {
@@ -14,7 +14,7 @@
area <- pnorm(truncate, p[1], p[2], lower = FALSE)
scale <- length(x)/sqrt(2 * pi)/p[2]/area
p <- c(p, scale)
- oct <- as.preston(x)
+ oct <- as.preston(x, ...)
x <- as.numeric(names(oct))
fit <- p[3] * exp(-(x - p[1])^2/2/p[2]^2)
names(p) <- c("mode", "width", "S0")
Modified: pkg/vegan/man/fisherfit.Rd
===================================================================
--- pkg/vegan/man/fisherfit.Rd 2011-01-30 22:09:32 UTC (rev 1472)
+++ pkg/vegan/man/fisherfit.Rd 2011-01-31 16:48:14 UTC (rev 1473)
@@ -34,6 +34,7 @@
\method{lines}{prestonfit}(x, line.col = "red", lwd = 2, ...)
veiledspec(x, ...)
as.fisher(x, ...)
+as.preston(x, tiesplit = FALSE, ...)
}
\arguments{
@@ -54,7 +55,9 @@
\item{bar.col}{Colour of data bars.}
\item{line.col}{Colour of fitted line.}
\item{lwd}{Width of fitted line.}
- \item{\dots}{Other parameters passed to functions. }
+ \item{\dots}{Other parameters passed to functions. Ignored in
+ \code{prestonfit} and \code{tiesplit} passed to \code{as.preston} in
+ \code{prestondistr}. }
}
\details{
In Fisher's logarithmic series the expected
@@ -125,7 +128,10 @@
The functions have common \code{print}, \code{plot} and \code{lines}
methods. The \code{lines} function adds the fitted curve to the
octave range with line segments showing the location of the mode and
- the width (sd) of the response.
+ the width (sd) of the response. Function \code{as.preston}
+ transforms abundance data to octaves. Argument \code{tiesplit} will
+ not influence the fit in \code{prestondistr}, but it will influence
+ the barplot of the octaves.
The total extrapolated richness from a fitted Preston model can be
found with function \code{veiledspec}. The function accepts results
More information about the Vegan-commits
mailing list