[Vegan-commits] r1064 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Oct 30 09:21:24 CET 2009
Author: jarioksa
Date: 2009-10-30 09:21:24 +0100 (Fri, 30 Oct 2009)
New Revision: 1064
Modified:
pkg/vegan/R/rarefy.R
pkg/vegan/inst/ChangeLog
Log:
rarefy failed with one site & vector of sample sizes
Modified: pkg/vegan/R/rarefy.R
===================================================================
--- pkg/vegan/R/rarefy.R 2009-10-29 07:00:00 UTC (rev 1063)
+++ pkg/vegan/R/rarefy.R 2009-10-30 08:21:24 UTC (rev 1064)
@@ -30,6 +30,7 @@
}
if (length(sample) > 1) {
S.rare <- sapply(sample, function(n) apply(x, MARGIN, rarefun, sample = n))
+ S.rare <- matrix(S.rare, ncol=length(sample))
colnames(S.rare) <- paste("N", sample, sep="")
if (se) {
dn <- unlist(dimnames(x)[MARGIN])
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2009-10-29 07:00:00 UTC (rev 1063)
+++ pkg/vegan/inst/ChangeLog 2009-10-30 08:21:24 UTC (rev 1064)
@@ -4,6 +4,9 @@
Version 1.16-32 (opened October 24, 2009)
+ * rarefy: failed with one site and many sample sizes like
+ rarefy(rpois(10, 2), sample=2:3).
+
* msoplot: uses standard legend() to display info instead of hand
crafted positioning of the legend information.
More information about the Vegan-commits
mailing list