summaryrefslogtreecommitdiff
path: root/R/rmad.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/rmad.R')
-rw-r--r--R/rmad.R2
1 files changed, 2 insertions, 0 deletions
diff --git a/R/rmad.R b/R/rmad.R
index 46e9b35..5e9a1d7 100644
--- a/R/rmad.R
+++ b/R/rmad.R
@@ -18,6 +18,8 @@ rmad <- function(x, y = NULL, na.rm = FALSE, even.correction = FALSE, num.thread
## set number of threads
if (num.threads == "half-max") {
num.threads <- 0L
+ } else if (num.threads == 0) {
+ num.threads <- 1L
} else {
storage.mode(num.threads) <- "integer"
}