In R, I have a raster object for which I would like to set a certain level of transparency. When I visualize it, everything is fine
library(raster) test <- raster(x = matrix(1:16, 4)) plot(test, alpha = 0.25)
but now I would like to write my raster in .tif format through the
writeRaster() function. Is it possible to store the level of transparency at the pixel level?
I need this step because, starting from the .tif object, I would like to produce tiles of such raster that will be displayed as basemaps Leaflet inside an online application.