Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: comparing variable importnace...Error in match.names(clabs, names(xi)) : names do not match previous names #88

Open
BettyBoyse opened this issue May 7, 2020 · 3 comments

Comments

@BettyBoyse
Copy link

Dear Sylvain and Lukas,

I keep getting this error when I run stack_modelling and I can't understand in the script where it is coming from/what I can do to fix it or if it is impacting my final model.

I understand that this error is related to rbind() but unsure where this is in the stack_modelling script?

Best wishes,
Betty

@lukasbaumbach
Copy link
Collaborator

I was not able to reproduce this error with the example data. The @variable.importance was always filled, regardless of the other errors.
Can you please check, if this is also a problem when running ensemble_modelling?

The section where this happens is probably in stacking:

SSDM/R/stacking.R

Lines 284 to 288 in d8152bd

cat(" comparing variable importance...")
}
stack@variable.importance <- esdm@variable.importance
for (i in 2:length(esdms)) {
a <- try(rbind(stack@variable.importance, esdms[[i]]@variable.importance))

Also, I remember the typo "variable importnace" from an earlier version of SSDM, where I corrected it. So I am wondering if this is really the latest SSDM version? Can you check if the above lines are the same in your local SSDM functions?

@BettyBoyse
Copy link
Author

BettyBoyse commented May 8, 2020

I have checked and the error does not appear when running ensemble_modelling.

When I look at the stacking function (SSDM::stacking) I get this:

new("nonstandardGenericFunction", .Data = function (esdm, ...,
name = NULL, method = "pSSDM", rep.B = 1000, Env = NULL,
range = NULL, endemism = c("WEI", "Binary"), eval = TRUE,
verbose = TRUE, GUI = FALSE)
{
return(standardGeneric("stacking"))
}, generic = "stacking", package = "SSDM", group = list(), valueClass = character(0),
signature = c("esdm", "name", "method", "rep.B", "Env",
"range", "endemism", "eval", "verbose", "GUI"), default = NULL,
skeleton = (function (esdm, ..., name = NULL, method = "pSSDM",
rep.B = 1000, Env = NULL, range = NULL, endemism = c("WEI",
"Binary"), eval = TRUE, verbose = TRUE, GUI = FALSE)
stop("invalid call in method dispatch to 'stacking' (no default method)",
domain = NA))(esdm, ..., name = name, method = method,
rep.B = rep.B, Env = Env, range = range, endemism = endemism,
eval = eval, verbose = verbose, GUI = GUI))

It doesn't seem to give me full code but it does when I look at other SSDM functions?!

I have checked package version, I have 0.2.8

@sylvainschmitt
Copy link
Owner

Please provide a minimal example with the package data if you want it to be further investigated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants