Learn R Programming

satellite (version 1.0.5)

subset: Subset of Satellite object data layers

Description

Create a subset of data layers from a Satellite object and return it as a standalone Satellite object.

Usage

# S4 method for Satellite
subset(x, sid, cid)

# S4 method for Satellite,ANY,ANY [[(x, i)

Value

A Satellite object

A Satellite object

A Satellite object

Arguments

x

Satellite object providing the source band(s) to be adjusted.

sid

Band numbers or bcde which should be extracted

cid

Calibration information used for subsetting (only works if sid is not supplied to the function)

i

Layer index(es) for subsetting.

Examples

Run this code
## sample data
path <- system.file("extdata", package = "satellite")
files <- list.files(path, pattern = glob2rx("LC08*.TIF"), full.names = TRUE)
sat <- satellite(files)

sat[[2:5]]
subset(sat, cid = "SC")

Run the code above in your browser using DataLab