andrefaa / ENMTML

Create Ecological Niche Models with TheMetaLand
47 stars 13 forks source link

Projection Issue #340

Closed pvilelacruz closed 2 years ago

pvilelacruz commented 2 years ago

With R and all packages updated, the following error occurs:

" Error in h(simpleError(msg, call)) : erro na avaliação do argumento 'x' na seleção do método para a função 'brick': 'Cannot create a RasterLayer object from this file.' "

Removing projection "proj_dir=NULL", package is functional.

We tested it in six computers. Using old versions of all packages (we forgot to update), it works. Our best "solution" was copy all directory of R and packages from old computers and paste in new one. However, it is not the best solutions, and in some cases it is not functional.

@sjevelazco @andrefaa Any solution or suggestion? Thank you for your time.

sjevelazco commented 2 years ago

Hi

I guess you have an extra file in one of the subfolders in your proj_dir that can not be treated by raster package. What is the format of your rasters?

sjevelazco commented 2 years ago

Hi, I changed some codes used to compare file names. Please can you reinstall ENMTML and run it again. Also, there is a problem with raster package and the new R version. So it is possible you experience some problems with ENMTML until this raster error is fixed.

pvilelacruz commented 2 years ago

Hi @sjevelazco. All rasters are in '.tif', direct from WorldClim. We check all files. Thank you for your answers. I will reinstall ENMTML and run it again. As soon as possible I return with the results.