Learn R Programming

ursa (version 3.9.4)

rep: Replicate bands of raster image.

Description

rep for object of class ursaRaster creates new ursaRaster objects with repitition of original band sequence.

Usage

# S3 method for ursaRaster
rep(x, ...)

Arguments

x

Object of class ursaRaster

Further arguments to be passed to or from other methods. Keywords:

times

Positive integer. Number of times to repeat each band.

If argument has no name, then times is assumpted.

Value

Object of class ursaRaster.

See Also

c for ursaRaster.

Examples

Run this code
# NOT RUN {
session_grid(NULL)
session_grid(regrid(mul=1/4))
a <- ursa_dummy(nband=3)
print(a)
b1 <- rep(a,by=2)
print(b1)
b2 <- rep(a,length=5)
print(b2)
b3 <- rep(a[3],3)
print(b3)
# }

Run the code above in your browser using DataLab