Browse code

allow setDistributedParams to have no arguments so that parameters can be reset to defaults

Tom Sherman authored on 19/02/2019 18:40:54
Showing 1 changed files

... ...
@@ -112,8 +112,7 @@ function(object, nSets, cut, minNS, maxNS)
112 112
     message("setting distributed parameters - call this again if you change ",
113 113
         "nPatterns")
114 114
 
115
-    object@nSets <- nSets
116
-
115
+    object@nSets <- ifelse(is.null(nSets), object@nSets, nSets)
117 116
     object@cut <- ifelse(is.null(cut), object@nPatterns, cut)
118 117
     object@minNS <- ifelse(is.null(minNS), ceiling(object@nSets / 2), minNS)
119 118
     object@maxNS <- ifelse(is.null(maxNS), object@minNS + object@nSets, maxNS)