Skip to content

Commit

Permalink
Correct error msg with numeric targets; DS-3459 [revdep skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
mwmclean committed Aug 3, 2021
1 parent 4c059f9 commit dc7c8f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/calibrate.R
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ numericTargets <- function(targets, adjustment.variables, numeric.targets, subse
if (max(numvar) < tgt)
stop("The target for ", varname, " of ", tgt, " is higher than the maximum value of the variable", (if(is.null(subset)) "" else " (after applying filter/subset)"))
if (min(numvar) > tgt)
stop("The target for ", varname, " of ", tgt, " is lower than the maximum value of the variable", (if(is.null(subset)) "" else " (after applying filter/subset)"))
stop("The target for ", varname, " of ", tgt, " is lower than the minimum value of the variable", (if(is.null(subset)) "" else " (after applying filter/subset)"))
}
targets
}
Expand Down

0 comments on commit dc7c8f1

Please sign in to comment.