install.packages(“raster”)

library(raster)

#Blue b2 <- raster(‘C:/Users/jose_/Desktop/2021-1/ELECTIVA_2/TRABAJO PARA ENVIAR 3/rs/LC08_044034_20170614_B2.tif’) #Green b3 <- raster(‘C:/Users/jose_/Desktop/2021-1/ELECTIVA_2/TRABAJO PARA ENVIAR 3/rs/LC08_044034_20170614_B3.tif’) #Red b4 <- raster(‘C:/Users/jose_/Desktop/2021-1/ELECTIVA_2/TRABAJO PARA ENVIAR 3/rs/LC08_044034_20170614_B4.tif’) #Near Infrared (NIR) b5 <- raster(‘C:/Users/jose_/Desktop/2021-1/ELECTIVA_2/TRABAJO PARA ENVIAR 3/rs/LC08_044034_20170614_B5.tif’)

b2

install.packages(“rgdal”)

library(rgdal)

coordinate reference system (CRS)

crs(b2)

ncell(b2)

dim(b2)

res(b2)

nlayers(b2)

s <- stack(b5, b4, b3) # Check the properties of the RasterStack s

par(mfrow = c(2,2))

plot(b2, main = “Blue”, col = gray(0:100/ 100)) plot(b3, main = “Green”, col = gray(0:100/ 100)) plot(b4, main = “Red”, col = gray(0:100/ 100)) plot(b5, main = “NIR”, col = gray(0:100/ 100))

landsatRGB <- stack(b4, b3, b2) plotRGB(landsatRGB, axes = TRUE, stretch = “lin”, main = “landsat true color composite”)