I am working with two rasters stacks: bioclim (climate data) and soil data. They have different resolution. The description of data:
bioclim
#class : RasterStack
#dimensions : 163, 319, 51997, 19 (nrow, ncol, ncell, nlayers)
#resolution : 0.1666667, 0.1666667 (x, y)
#extent : 18.83337, 72.00005, 40.99999, 68.16666 (xmin, xmax, ymin, ymax)
#crs : NA
soil
#class : RasterStack
#dimensions : 1256, 2213, 2779528, 5 (nrow, ncol, ncell, nlayers)
#resolution : 0.02259376, 0.02259376 (x, y)
#extent : 20, 69.99999, 42.62224, 71 (xmin, xmax, ymin, ymax)
#crs : NA
I tried function:
soil <- aggregate(soil, fact=7.376669487504514)
I just put this number (fact), because it equals to resolution of bioclim divided by resolution of soil.
But, they have little differences:
res(soil)
#[1] 0.1581563 0.1581563
res(bioclim)
#[1] 0.1666667 0.1666667
Also I tried other functions like aggregate
, but not successful.
I need to create main stack of two stacks: bioclim and soil. Please, could anybody help me?
env <- stack(bioclim,soil)