[Vegan-commits] r379 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri May 30 12:58:07 CEST 2008
Author: wagnerh1
Date: 2008-05-30 12:58:07 +0200 (Fri, 30 May 2008)
New Revision: 379
Modified:
pkg/R/mso.R
Log:
Automatically collapse distance classes larger than half the maximum distance into a single distance class.
Modified: pkg/R/mso.R
===================================================================
--- pkg/R/mso.R 2008-05-30 09:03:13 UTC (rev 378)
+++ pkg/R/mso.R 2008-05-30 10:58:07 UTC (rev 379)
@@ -11,6 +11,8 @@
if (round.up)
H <- ceiling(Dist/grain) * grain
else H <- round(Dist/grain) * grain
+ hmax <- round((max(Dist)/2)/grain) *grain
+ H[H > hmax] <- max(H)
object$H <- H
H <- as.vector(H)
Dist <- sapply(split(Dist, H), mean)
More information about the Vegan-commits
mailing list