Dear list members,

I am trying to stack 2 rasters, but I got an error:

> nd <- stack(forestRaster, distpob_b)
Error in compareRaster(x) : different extent

> show(forestRaster)
class       : RasterLayer
dimensions  : 188, 140, 26320  (nrow, ncol, ncell)
resolution  : 500, 500  (x, y)
extent      : 447235.4, 517235.4, 1122046, 1216046  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=500000 +y_0=0
+datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0
data source : in memory
names       : layer
values      : 0, 100  (min, max)

> show(distpob_b)
class       : RasterLayer
dimensions  : 314, 236, 74104  (nrow, ncol, ncell)
resolution  : 300, 300  (x, y)
extent      : 447181, 517981, 1121851, 1216051  (xmin, xmax, ymin, ymax)
coord. ref. : NA
data source : in memory
names       : layer
values      : 5.644242, 9530.715  (min, max)


How I make 2 raster with equal extent?

Best,

Manuel

-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola@una.ac.cr
mspinola10@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

	[[alternative HTML version deleted]]

