I have a raster that displays elevational values at a global scale. I would like to set the minimum and maximum values based on the values I would like to choose.
> elev
class : RasterLayer
dimensions : 18000, 43200, 777600000 (nrow, ncol, ncell)
resolution : 0.008333334, 0.008333334 (x, y)
extent : -180, 180, -60, 90.00001 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
data source : E:\Data\Elevation_Data\alt\alt
names : alt
values : -431, 8233 (min, max)
attributes :
ID COUNT
from: -431 2
to : 8233 1
> image(elev, zlim=c(0,1200))
The above command simply plots an image with the necessary values, but I would like a raster with just those limits.
Any thoughts?