brshipley / megaSDM

Other
22 stars 3 forks source link

MaxentProj Error after updating to version 2 #7

Closed yucheols closed 1 year ago

yucheols commented 1 year ago

Hello!

It's been a while since I used this package, but I recently updated the package to version 2 and was running through the example code provided in the vignette again to make sure everything is running smoothly. Everything was fine until I reached the MaxentProj step, at which point I got the following error; below is the actual console output:

MaxEntProj(input = model_output, time_periods = time_periods, scenarios = scenarios, study_dir = study_dir, predict_dirs = predictdir, output = result_dir, ThreshMethod = "Maximum.test.sensitivity.plus.specificity", aucval = 0.7, ncores = 2) [1] " Removing species with Test AUC Values < AUC threshold from subsequent analyses" Error in checkForRemoteErrors(val) : 2 nodes produced errors; first error: The threshold for creating binary maps is not found in 'maxentResults.csv'. Revise in config

I used the example dataset provided with the package, and exactly followed the code in the vignette. Also, I opened the maxentResults.csv file to check because the error message said it could not find the threshold value for binary conversion. But nothing seemed off, so I am pretty confused about getting this error. What would be causing this to happen??

Thanks in advance for looking into this!

All the best, Yucheol

yucheols commented 1 year ago

When I run MaxentProj with my own data, with ncores set to 1, the following error appreared:

Exception in thread "main" java.lang.NumberFormatException: For input string: "" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.base/java.lang.Integer.parseInt(Integer.java:662) at java.base/java.lang.Integer.parseInt(Integer.java:770) at density.GridIO$GRDHeader.(GridIO.java:106) at density.LazyGrid.LazyGridGrd(LazyGrid.java:121) at density.LazyGrid.initialize(LazyGrid.java:29) at density.LazyGrid.(LazyGrid.java:17) at density.Project.newGrid(Project.java:78) at density.Project.getGrid(Project.java:43) at density.Project.projectGrid(Project.java:188) at density.Project.doProject(Project.java:90) at density.Project.main(Project.java:492) Error in if (!grepl("clamping", r[k])) { : argument is of length zero

So I think this may have something to do with Java??

brshipley commented 1 year ago

Hi Yucheol, Unfortunately, I was unable to replicate either issue, even after uninstalling and re-installing the package: Maybe updating R and RStudio to the most recent versions would help? Sorry I can't be more helpful! Ben Shipley

yucheols commented 1 year ago

Hi Ben, I updated R & RStudio and everything works smoothly now :) Thanks a lot!

Yucheol