Error during raster::crop saying ‘legend’ is not a slot in class “RasterStack”

المشرف العام

Administrator
طاقم الإدارة
I am working with a set of raster layers containing CHIRPS monthly rainfall amounts over Africa. For purposes of reproducing the below code, I staged the decompressed tif files on Dropbox.

Now, let's say I want to crop the stacked images by a given geographic extent. Here's the referring code.

## file importlibrary(raster)ch_fls_chirps
 
أعلى