Monday, January 28, 2013

Created 9 tile layer of all the BIOCLIM and altitude. The only way I could figure out how to do it was in DIVA-GIS (although I am sure there is a (much faster!) way to do it in R).
  • Downloaded tiles 18, 19, 110, 28, 29, 210, 38, 39, 310.
  • Import each file to DIVA-GIS and convert all to .grd files.
  • Grid-->Merge and merge tiles but can only do 2 at a time. 
  • Finally will have a merged tile that is 60W-150W; -30S-60N

Finally, figured out how to correlate the BIOCLIM variables using R.
  • Upload all 19 layers plus altitude into R using the "raster" package.
    Rcommand:

    >bioclim1<-raster("/VOLUMES/LOLOYOHE BA/ Merged_layers/bio1_seasia9tile.grd")
    ...
    >bioclim19<-raster("/VOLUMES/LOLOYOHE BA/ Merged_layers/bio19_seasia9tile.grd")
    #stack the rasters
    >rastStack <- stack (altitude, bioclim1, bioclim2 ... bioclim19)
    >install.packages("dismo")
    >require(dismo)
    >pairs (rastStack, hist=TRUE, cor=TRUE, use="pairwise.complete.obs", maxpixels=10000)
  • Using the correlation matrix, I made my figure for the supplementary material for the manuscript.
    • Layers to include in analysis: altitude, BIO_2, BIO_5, BIO_8, BIO_13, BIO_14, BIO_15, BIO_18, BIO_19

No comments:

Post a Comment