1

This is the 32 year trend NDVI (raster data)

I would like to remove the green grids data by using R (the green pixel value is larger than 0.03) NDVI trend

and this one is R code that i use but i cannot remove it ...

R code

Could anyone please suggest me what should I do ?

regards, faris

2

Ok I use this

NDVI.slope[NDVI.slope>0.03] <- NA

In stead of

NDVI.slope_2<-trim((NDVI.slope), padding=0, values = c(0.02:0.03))

................ and It work !!!!! ...................

  • This is exactly the recommendation that I would have given. However, keep in mind that when you use a bracket index on a raster class object it is read into memory thus, negating the advantage of holding rasters out of memory. Using the functions for reclassifying data, provided by the raster package, will keep problems memory safe. – Jeffrey Evans Mar 28 '17 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.