# NOT RUN {
# path to the cropped and cutted MODIS images for the region of Navarre
img.dir <- system.file("ExNavarreVar", package = "RGISTools")
# list all the tif files
img.files <- list.files(img.dir, pattern="\\.tif$", recursive = TRUE, full.names = TRUE)
# print the MOD09 bands
getRGISToolsOpt("MOD09BANDS")
# select the red, blue and NIR bands
red <- raster(img.files[1])
blue <- raster(img.files[3])
green <- raster(img.files[4])
q.range=c(0.001,0.999)
image<-varRGB(red,green,blue,q.range)
print(plotRGB(image))
# }
Run the code above in your browser using DataLab