# NOT RUN {
sstfile <- system.file("extdata/sst.tif", package = "vapour")
lazyraster(sstfile)
## convert to raster (in memory, but not all of the source)
as_raster(lazyraster(sstfile))
## crop and stay as lazyraster
crop(lazyraster(sstfile), raster::extent(142, 143, -50, -45))
## crop and convert to raster
as_raster(crop(lazyraster(sstfile), raster::extent(142, 143, -50, -45)))
# }
Run the code above in your browser using DataLab