Skip to content

Commit

Permalink
Remove method = "GCV.Cp" from gam::gam model
Browse files Browse the repository at this point in the history
  • Loading branch information
MayaGueguen committed Jan 26, 2024
1 parent bf2fbd4 commit c4bf63d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/biomod2_classes_0.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ setMethod('BIOMOD.options.default', signature(mod = 'character', typ = 'characte
type = typ,
package = pkg,
func = fun,
args.names = formalArgs(fun),
args.default = as.list(formals(fun))
args.names = eval(parse(text = paste0("formalArgs(", pkg, "::", fun, ")"))),
args.default = eval(parse(text = paste0("as.list(formals(", pkg, "::", fun, "))")))
)
} else {
params.MAXENT = list(path_to_maxent.jar = getwd(),
Expand Down Expand Up @@ -428,9 +428,11 @@ setMethod('BIOMOD.options.dataset', signature(strategy = 'character'),
argstmp[["x"]] = NULL
argstmp[["y"]] = NULL
argstmp$family = binomial(link = 'logit')
argstmp$method = "GCV.Cp"
if (pkg == "gam") { argstmp$control = gam::gam.control() }
if (pkg == "mgcv") { argstmp$control = mgcv::gam.control() }
if (pkg == "mgcv") {
argstmp$method = "GCV.Cp"
argstmp$control = mgcv::gam.control()
}
}
if (mod == "GLM") {
argstmp$family = binomial(link = 'logit')
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
Binary file modified data/OptionsBigboss.rda
Binary file not shown.

0 comments on commit c4bf63d

Please sign in to comment.