# NOT RUN {
# Create a SpatRaster from scratch
x <- rast(nrow=108, ncol=21, xmin=0, xmax=10)
# Create a SpatRaster from a file
f <- system.file("exdata/test.tif", package="terra")
r <- rast(f)
s <- rast(system.file("exdata/logo.grd", package="terra"))
# Create a skeleton with no associated cell values
rast(s)
# }
Run the code above in your browser using DataLab