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

Unable to use specific test occurrence records with maxent() #46

Open
daniellesloan opened this issue May 9, 2024 · 0 comments
Open

Comments

@daniellesloan
Copy link

daniellesloan commented May 9, 2024

Hello,

For the sake of reproducible results I have already randomly split my occurrence records into training and testing, and would like to input these records into dismo::maxent. I have attempted to do this using the code below:

 mod_args
 [1] "linear=TRUE"                                                                 
 [2] "quadratic=TRUE"                                                              
 [3] "hinge=TRUE"                                                                  
 [4] "product=TRUE"                                                                
 [5] "threshold=TRUE"                                                              
 [6] "betamultiplier=3"                                                            
 [7] "randomtestpoints=40"                                                         
 [8] "jackknife=TRUE"                                                              
 [9] "responsecurves=TRUE"                                                         
[10] "testsamplesfile=C:/Users/Danielle/Downloads/presence_records_gridded_300.csv"

maxent_train <- dismo::maxent(env, # environmental variables (aka predictors)
                                occ_train, # training occurrence records
                                bgr, # background points, n = 10000
                                args = mod_args,
                                removeDuplicates = FALSE)

However when doing this I get the following error message:

Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
  cannot open file 'C:\Users\Danielle\AppData\Local\Temp\RtmpcTd0O7/raster/maxent/1115481455/species.lambdas': No such file or directory

When I remove the argument testsamplesfiles=... from mod_args, the function works as expected.

Is there a way to supply maxent with specific testing occurrence records?

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

1 participant