[Dplr-commits] r681 - branches/redfit/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 4 11:15:24 CEST 2013


Author: mvkorpel
Date: 2013-09-04 11:15:23 +0200 (Wed, 04 Sep 2013)
New Revision: 681

Modified:
   branches/redfit/R/detrend.series.R
Log:
Check arguments 'make.plot' and 'pos.slope': must be TRUE or FALSE


Modified: branches/redfit/R/detrend.series.R
===================================================================
--- branches/redfit/R/detrend.series.R	2013-09-04 08:20:05 UTC (rev 680)
+++ branches/redfit/R/detrend.series.R	2013-09-04 09:15:23 UTC (rev 681)
@@ -3,6 +3,8 @@
              method = c("Spline", "ModNegExp", "Mean"),
              nyrs = NULL, f = 0.5, pos.slope = FALSE)
 {
+    stopifnot(identical(make.plot, TRUE) || identical(make.plot, FALSE),
+              identical(pos.slope, FALSE) || identical(pos.slope, TRUE))
     known.methods <- c("Spline", "ModNegExp", "Mean")
     method2 <- match.arg(arg = method,
                          choices = known.methods,



More information about the Dplr-commits mailing list