raster.cor: Calculates the correlation coefficient between two rasters.

View source: R/raster.cor.R

raster.corR Documentation

Calculates the correlation coefficient between two rasters.

Description

Calculates the correlation coefficient between two rasters.

Usage

raster.cor(x, y, method = "spearman")

Arguments

x

Either a raster or an ENMTools model object with a suitability raster.

y

Either a raster or an ENMTools model object with a suitability raster.

method

The method to be used for calculating correlations. Defaults to spearman, but can take "kendall" or "pearson" as well.

Value

A numeric correlation coefficient.

Examples

data(euro.worldclim)
raster.cor(euro.worldclim[[1]], euro.worldclim[[2]])

ENMTools documentation built on April 11, 2023, 6:09 p.m.