subset_nri: Subsetting 'Nri'-objects

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Return subsets of Nri-objects which meet conditions.

Usage

1
2
## S4 method for signature 'Nri'
subset(x, subset, ...)

Arguments

x

Object of class 'Nri'.

subset

Logical expression indicating spectra to keep: missing values are taken as false. See details section.

...

Further arguments passed to agrep.

Details

Matchable objects are SI data. Use column names to identify the respectrive SI. See SI to access SI of a Nri. IDs of samples may be accessed using "id.nri" as variable name.

Value

Object of class Nri.

Author(s)

Lukas Lehnert

See Also

Nri, SI

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(spectral_data)

## Calculate all possible combinations for WorldView-2-8
spec_WV <- spectralResampling(spectral_data, "WorldView2-8",
                              response_function = FALSE)
nri_WV <- nri(spec_WV, recursive = TRUE)

## Return names of SI data
names(SI(nri_WV))

## Devide into both seasons
sp_summer <- subset(nri_WV, season == "summer")
sp_spring <- subset(nri_WV, season == "spring")

## Print both Nri-objects
sp_summer
sp_spring

hsdar documentation built on Nov. 17, 2017, 4:35 a.m.