This is how I got the 19 BIOCLIM variables through R:
library(raster)
library(rgdal)
bio19.2.5<-getData('worldclim', var='bio', res=2.5)
# Next command crops the raster to the extent of the distribution of the genera I'm interested in.
leu.extent<-extent(-120,-60,-5,35)
bio19.crop<-crop(bio19.2.5, leu.extent)
plot(bio19.crop,1)
> bio19.crop
class : RasterBrick
dimensions : 960, 1440, 1382400, 19 (nrow, ncol, ncell, nlayers)
resolution : 0.04166667, 0.04166667 (x, y)
extent : -120, -60, -5, 35 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
values : in memory
layer names : bio1, bio2, bio3, bio4, bio5, bio6, bio7, bio8, bio9, bio10, bio11, bio12, bio13, bio14, bio15, ...
min values : -15, 18, 23, 95, 37, -121, 56, -19, -20, -13, -41, 19, 8, 0, 7, ...
max values : 294, 213, 95, 9032, 428, 242, 419, 332, 299, 340, 285, 10577, 1197, 697, 209, ...
# And here is the command I've been using to export this raster file; I first wanted to create a .asc from my raster file, but couldn't find the
# appropriate function in R. From I'm been able to gather though, Maxent should also be able to handle .grd files as layers;
toto<-writeRaster(bio19.crop, filename="bio19crop.grd")
Two files are created, the grd. and gri file for bio19_crop. The layer "bio19crop" pops up when it is saved in the layer folder in Maxent. Everytime I try to run it though, it doesn't work. I've attached the produced .grd file (but not the .gri, it won't upload as it is 85MB in size).
I would really like to understand the best way to export this rasterbrick, because I would also like to use it to verify other things in the data, like colinearity of the 19 variables, with ENMtools.
Any help or hint you could give with this matter would be great!
Thanks,
Edeline