Skip to content

Commit

Permalink
Modify application of user-defined fnMap
Browse files Browse the repository at this point in the history
  • Loading branch information
k-m-m authored Nov 6, 2022
1 parent 4bb3bcf commit d8cfef1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/DEoptim.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ DEoptim <- function(fn, lower, upper, control = DEoptim.control(), ...,
if(!is.null(fnMap)) {
fnMapC <- function(`*params`,...) {
## run mapping function
mappedPop <- t(apply(X = `*params`, MARGIN = 1, FUN = fnMap, ...))
mappedPop <- t(apply(X = `*params`, MARGIN = 1, FUN = fnMap))
if(all(dim(mappedPop) != dim(`*params`))) ## check results
stop("mapping function did not return an object with ",
"dim NP x length(upper).")
Expand Down

0 comments on commit d8cfef1

Please sign in to comment.