terra (version 1.0-10)

rep: Combine

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 DataCamp Workspace