Skip to content

Commit

Permalink
Update calibSample method argument check
Browse files Browse the repository at this point in the history
method sent to calibSample_work is not currently set with user specified option from calibSample function
and errors out due to non set method at calibSample_work
  • Loading branch information
shyamrallapalli authored Feb 20, 2024
1 parent 1b40ecf commit 405d170
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/calibSample.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ setMethod("calibSample", c(inp="df_or_dataObj_or_simPopObj", totals="dataFrame_o
args <- list(...)
if ( is.null(args$method) ) {
method <- "raking"
} else if (args$method %in% c("raking", "linear", "logit")) {
method <- args$method
} else {
stop("calibSample 'method' option should be one of c('raking', 'linear', 'logit') \n")
}
if ( is.null(args$bounds) ) {
bounds <- c(0,10)
Expand Down

0 comments on commit 405d170

Please sign in to comment.