Skip to content

Commit daf6775

Browse files
committed
Additional check for createArgusInput() to make sure that the holding variable is integer (sdcTools/UserSupport#302)
1 parent ade7328 commit daf6775

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# sdcTable next
2+
- Additional check for `createArgusInput()` to make sure that the holding variable is integer (if specified)
3+
14
# sdcTable 0.32.6
25
- Improvements in `SIMPLEHEURISTIC` when adding additional suppressions
36
- Add `RegSDC` as suggested package in order to avoid a CRAN note

R/tauBatch_helpers.R

+3
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ check_varinput <- function(obj, type, responsevar, shadowvar, costvar, requestva
104104
if (!holdingvar %in% cn) {
105105
stop("non-valid variable selected for choice 'holdingvar'.\n")
106106
}
107+
if (!is.integer(obj@dataObj@rawData[[holdingvar]])) {
108+
stop("holdingvar (", shQuote(holdingvar), ") is not an integer!")
109+
}
107110
} else {
108111
holdingvar <- ""
109112
}

0 commit comments

Comments
 (0)