I'm attempting to use the MaxentVariableSelection package to select the best set of environmental variables for a Maxent species distribution model.
I keep getting these two errors:
-
Error: Error reading files
-
Error in file(file, "rt"): cannot open the connection
In addition: Warning messages:
- In dir.create(outdir):
/Users/klairetrhodes/Desktop/Thesis/Output
already exists - In file(file, "rt"):
cannot open file
/Users/klairetrhodes/Desktop/Thesis/Output/maxentResults.csv
: No such file or directory
I have confirmed the following:
- all my environmental variables are ASCII files with common extent
- occurrence and background data is properly formatted
- file paths are accurate and exist
- I have run a simple Maxent model using dismo with a small set of variables -- that seemed to work fine
This error suggests that there's an issue with reading files. It could be due to incorrect file paths or incorrect file formats as you already suggest yourself.
try
to see where your working directory is located.
Create directories if not exist: Before trying to create a directory using dir.create(outdir), you can check if the directory already exists. If it doesn't exist, then create it.