Learn R Programming

terra (version 1.3-22)

rep: Replicate layers

Description

Replicate layers in a SpatRaster

Usage

# S4 method for SpatRaster
rep(x, ...)

Arguments

x

SpatRaster

...

arguments as in rep

Value

SpatRaster

Examples

Run this code
# NOT RUN {
s <- rast(system.file("ex/logo.tif", package="terra"))   
x <- rep(s, 2)
nlyr(x)
names(x)
x
# }

Run the code above in your browser using DataLab