R: Subset of Satellite object data layers

subset {satellite} | R Documentation

## 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 signature 'Satellite'
    subset(x, sid, cid)

    ## S4 method for signature 'Satellite,ANY,ANY'
    x[[i]]

### 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.

### Value

A Satellite object

A Satellite object

A Satellite object

### Examples

    ## 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")

[Package satellite version 1.0.1 Index]