]> git.donarmstrong.com Git - ape.git/blobdiff - R/mvr.R
various bug fixes
[ape.git] / R / mvr.R
diff --git a/R/mvr.R b/R/mvr.R
index a2218fcb78124a699f3704a8cdba36935fda520f..8c4c8b3b80a3588abdf206cbeb553a647c2fc5f9 100644 (file)
--- a/R/mvr.R
+++ b/R/mvr.R
@@ -1,4 +1,4 @@
-## mvr.R (2011-10-11)
+## mvr.R (2012-03-30)
 
 ##   Minimum Variance Reduction
 
@@ -29,6 +29,9 @@ mvr <- function(X, V)
 
 mvrs <- function(X, V, fs = 15)
 {
+    if (fs < 1)
+        stop("argument 'fs' must be a non-zero positive integer")
+
     if (is.matrix(X)) X <- as.dist(X)
     if (is.matrix(V)) V <- as.dist(V)