if (FALSE) {
# These examples require external data files not included with the package
# Global correlation between NDVI and soil nitrogen
correlation <- calculate_spatial_correlation(ndvi_raster, nitrogen_raster)
# Local correlation with moving window
local_corr <- calculate_spatial_correlation(
ndvi_raster, nitrogen_raster,
local_correlation = TRUE,
window_size = 5
)
}
Run the code above in your browser using DataLab