Learn R Programming

terra (version 0.8-5)

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 DataLab