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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Mar 10 12:03:12 CET 2011


Author: jarioksa
Date: 2011-03-10 12:03:11 +0100 (Thu, 10 Mar 2011)
New Revision: 1532

Modified:
   pkg/vegan/R/rrarefy.R
Log:
fix gettextf() in stop()

Modified: pkg/vegan/R/rrarefy.R
===================================================================
--- pkg/vegan/R/rrarefy.R	2011-03-10 10:51:08 UTC (rev 1531)
+++ pkg/vegan/R/rrarefy.R	2011-03-10 11:03:11 UTC (rev 1532)
@@ -7,8 +7,8 @@
     if (ncol(x) == 1)
         x <- t(x)
     if (length(sample) > 1 && length(sample) != nrow(x))
-        stop(gettextf,
-             "length of 'sample' and number of rows of 'x' do not match")
+        stop(gettextf(
+             "length of 'sample' and number of rows of 'x' do not match"))
     sample <- rep(sample, length=nrow(x))
     colnames(x) <- colnames(x, do.NULL = FALSE)
     nm <- colnames(x)
@@ -28,8 +28,8 @@
     function(x, sample)
 {
     if (length(sample) > 1 &&  length(sample) != nrow(x))
-        stop(gettextf,
-             "length of  'sample' and number of rows of 'x' do not match")
+        stop(gettextf(
+             "length of  'sample' and number of rows of 'x' do not match"))
     x <- drop(as.matrix(x))
     ## dfun is kluge: first item of  vector x must be the sample size,
     ## and the rest  is the community data. This  seemed an easy trick



More information about the Vegan-commits mailing list