[Vegan-commits] r1474 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jan 31 18:02:41 CET 2011


Author: jarioksa
Date: 2011-01-31 18:02:40 +0100 (Mon, 31 Jan 2011)
New Revision: 1474

Modified:
   pkg/vegan/R/as.preston.R
Log:
remove empty octaves (like earlier versions did)

Modified: pkg/vegan/R/as.preston.R
===================================================================
--- pkg/vegan/R/as.preston.R	2011-01-31 16:48:14 UTC (rev 1473)
+++ pkg/vegan/R/as.preston.R	2011-01-31 17:02:40 UTC (rev 1474)
@@ -27,6 +27,8 @@
         freq[indx] <- tmp
     }
     names(freq) <- seq_along(freq) - 1
+    ## remove empty octaves
+    freq <- freq[freq>0]
     class(freq) <- "preston"
     freq
 }



More information about the Vegan-commits mailing list