| rep | R Documentation | 
Replicate layers in a SpatRaster
## S4 method for signature 'SpatRaster'
rep(x, ...)
| x | SpatRaster | 
| ... | arguments as in  | 
SpatRaster
s <- rast(system.file("ex/logo.tif", package="terra"))   
x <- rep(s, 2)
nlyr(x)
names(x)
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.