I have a raster stack (with binary values:0,1) and DEM. Both DEM and stack have same resolution and extent. I want to reclassify the values of stack using information from DEM. I want to reclassify stack values below 5000m to zero. How can i do this in R?