summaryrefslogtreecommitdiff
path: root/R/rmad.R
diff options
context:
space:
mode:
authorLuca Coraggio <luca.coraggio@unina.it>2021-10-21 12:10:10 +0000
committercran-robot <csardi.gabor+cran@gmail.com>2021-10-21 12:10:10 +0000
commit17556182f98e2dc51e236b01aec7eef054e7e2f9 (patch)
tree3d897d2e804a00b40856341a023a71e9f470f138 /R/rmad.R
parentca17d57dce048f57e03241f6120d539ec70d785a (diff)
version 2.0.1
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"
}