In R I'm trying to make a RasterStack of RasterLayers, they all have the same format, the only difference is that one of them is a solo raster and the others are bioclimatic variables. The soil layer had a resolution of ~ 1km and was redesigned to 5km to align with the others.
Firstly, you need them to be the same CRS and resolution in order to stack them. For this. Assuming your 5k raster also has a bigger extent for the purposes of this example, you can use
bigger_raster <- projectRaster(raster5k, smaller_raster)
Now, if your extents are still off - you'll need to use
raster::crop() to fix this.
new_raster <- crop(bigger_raster,smaller_raster)
bigger_raster will line up with