if(interactive()){
library(pliman)
# Load a raster showing the elevation of Luxembourg
mosaic <- mosaic_input(system.file("ex/elev.tif", package="terra"))
# Generate an interactive map using 'mapview' (works only in an interactive section)
cropped <- mosaic_crop(mosaic)
mosaic_view(cropped)
}
Run the code above in your browser using DataLab