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

do_many,do_any, and final_model #79

Open
eliascherenet opened this issue Oct 5, 2020 · 10 comments
Open

do_many,do_any, and final_model #79

eliascherenet opened this issue Oct 5, 2020 · 10 comments

Comments

@eliascherenet
Copy link

I was running the following code:
final_model(species_name = species[1],
algorithms = NULL, #if null it will take all the algorithms in disk
models_dir = test_folder,
which_models = c("raw_mean",
"bin_mean",
"bin_consensus"),
consensus_level = 0.5,
uncertainty = TRUE,
overwrite = TRUE)

ens <- ensemble_model

However, I found the following error
Error in final_model(species_name = species[1], algorithms = NULL, models_dir = test_folder, :
could not find function "final_model"

Error in ensemble_model(species_name = species[1], occurrences = occs, :
could not find function "ensemble_model"

I need your help on how to fix this issue.

@AndreaSanchezTapia
Copy link
Member

Hello @eliascherenet can you provide more details about your code? It seems as though modleR wasn't installed on your computer, or not loaded correctly.

@eliascherenet
Copy link
Author

eliascherenet commented Oct 7, 2020 via email

@eliascherenet
Copy link
Author

eliascherenet commented Oct 9, 2020 via email

@AndreaSanchezTapia
Copy link
Member

Hello Elias, GitHub does not allow for attachments.
Can you post a reproducible example of your code? Are you sure that modleR is correctly installed on your computer?

@eliascherenet
Copy link
Author

eliascherenet commented Oct 10, 2020 via email

@eliascherenet
Copy link
Author

dear Andrea,
devtools::load_all("../../1_modleR") failed to run in my machine. and also the loading "modleR " package refused. I need your help in fixing these issues.

@AndreaSanchezTapia
Copy link
Member

Hello Elias, when reading your script I can see that you are not using modleR but other packages, such as sdm and usdm.
As far as modleR goes, if
library(modleR)
tells you there is no package, you must install it, via remotes::install_github()
Check the README for installation:

remotes::install_github("Model-R/modleR",
                        build = TRUE,
                        dependencies = TRUE,
                        build_opts = c("--no-resave-data", "--no-manual"),
                        build_vignettes = TRUE)

devtools::load_all() is a command used for development and it is not meant to be run, you can skip that.

@eliascherenet
Copy link
Author

final_model(species_name = species[1],
algorithms = NULL, #if null it will take all the algorithms in disk
models_dir = test_folder,
which_models = c("raw_mean",
"bin_mean",
"bin_consensus"),
consensus_level = 0.5,
uncertainty = TRUE,
overwrite = TRUE)
I tried to run the above code for testing purpose and i found the following error,

Abarema_langsdorffii
Reading evaluation files for Abarema_langsdorffii in present
Extracting data for Abarema_langsdorffii bioclim
Reading models from .tif files
Error in x[[1]] : subscript out of bounds
Your help on how to fix this is appreciated!!!!!!

@eliascherenet
Copy link
Author

eliascherenet commented Oct 18, 2020 via email

@AndreaSanchezTapia
Copy link
Member

Hi Elias, your attachment is not coming through. Could you send a .zip file with your example data to [email protected], please? Occurrences for one species, scripts and one or two explanatory variables should be enough. I would like to examine a reproducible example of your code.

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

No branches or pull requests

2 participants