Commit ccc9b396 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

fix(Utils): use 'match.fun' instead of 'get' to get the body of a modelling function

Refs #119
parent c4644eae
Pipeline #22707 passed with stages
in 9 minutes and 16 seconds
......@@ -30,7 +30,7 @@
NameFunMod <- ifelse(test = FeatMod$Pkg %in% "airGR",
yes = paste("RunModel", FeatMod$NameMod, sep = "_"),
no = FeatMod$NameMod)
FunMod <- lapply(NameFunMod, FUN = get)
FunMod <- lapply(NameFunMod, FUN = match.fun)
IdMod <- which(sapply(FunMod, FUN = function(x) identical(FUN_MOD, x)))
if (length(IdMod) < 1) {
stop("'FUN_MOD' must be one of ", paste(NameFunMod, collapse = ", "))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment