From this:
To this:
Useful example with code in Rmd. Full script @GitHub
Load requiered libraries.
```{r setup, include=FALSE}
library(sp)
library(raster)
```
Some magic happens here - Check the full code @GitHub.
Store the result in GeoTIFF.
```{r save-downscaled-raster}
    # write GeoTIFF with float 32 and LZW compression
    writeRaster(corrected_raster, filename=paste(basepath, 
    '/' ,basename ,'.tif',sep=''), format="GTiff", overwrite=TRUE, 
    datatype = 'FLT4S', options=c("COMPRESS=LZW"))
```
Читать дальше......


 



