Function to have two raster with the same number of rows, columns and extension

EXTraster(R.Emax, R.Emin)

Arguments

R.Emax

RasterLayer. Raster with the largest extension. The extent of this raster will be transformed.

R.Emin

RasterLayer. Raster with the least extension.