Learn R Programming

satellite (version 0.1.0)

subset: Subset Satellite object data layers

Description

This function subsets a Satellite object and returns the extracted dataset as Satellite object.

Usage

## S3 method for class 'Satellite':
subset(x, sid, cid)

## S3 method for class 'Satellite,ANY,ANY': [[(x, i)

Arguments

x
Satellite or raster::Raster* 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.

Value

  • A Satellite object

    A Satellite object

    A Satellite object

Examples

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

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

Run the code above in your browser using DataLab