powered by
Calculates the correlation coefficient between two rasters.
raster.cor(x, y, method = "spearman")
A numeric correlation coefficient.
Either a raster or an ENMTools model object with a suitability raster.
The method to be used for calculating correlations. Defaults to spearman, but can take "kendall" or "pearson" as well.
data(euro.worldclim) raster.cor(euro.worldclim[[1]], euro.worldclim[[2]])
Run the code above in your browser using DataLab