如何将值1更改为NA

时间:2019-06-18 12:11:12

标签: r rstudio raster r-modis

我有一个问题,如何更改红色= 1的云的值,而不是云= NA变为云= NA而不是云= 1

r1<-brick("001/110-05_2015001.ers")
ggRGB(r1,r=2,g=3,b=1,stretch = "lin")
cldmsk<- cloudMask(r1, blue = 1, tir = 5)
ggR(cldmsk, 2, geom_raster = TRUE)
cldmsk_final <- cloudMask(cldmsk, threshold = 0.5, buffer = 3)
ggRGB(r1,2,3,1, stretch = "lin") +ggR(cldmsk_final[[1]], ggLayer = TRUE, forceCat = TRUE, geom_raster = TRUE) +scale_fill_manual(values = "red", na.value = NA)

0 个答案:

没有答案