subset-methods | R Documentation |
SpectraInTime-class
Subsetting SpectraInTime-class
## S4 method for signature 'SpectraInTime,ANY,ANY' x[i, j, ..., drop = ""] ## S4 method for signature 'SpectraInTime,missing,ANY' x[i, j, ..., drop = ""] ## S4 method for signature 'SpectraInTime,ANY,missing' x[i, j, ..., drop = ""] ## S4 method for signature 'SpectraInTime,missing,missing' x[i, j, ..., drop = ""] ## S4 method for signature 'SpectraInTimeComp,ANY,ANY' x[i, j, ..., drop = ""] ## S4 method for signature 'SpectraInTimeComp,missing,ANY' x[i, j, ..., drop = ""] ## S4 method for signature 'SpectraInTimeComp,ANY,missing' x[i, j, ..., drop = ""]
x |
object to subset |
i |
subsetting rows ( timePoints ) |
j |
subsetting columns ( spectral axis ) |
... |
additional parameters
|
drop |
for consistancy, not used |
SpectraInTime-class
### subsetting [ time , spectral axis, options ] spectralEx <- getSpectraInTimeExample() spectraSubset <- spectralEx[ r( 1000 , 30000 ) , r(130 , 135 ) ] spectraSubsetTime <- spectralEx[ r( 1000 , 30000 ) , ] spectraSubsetSpectralVals <- spectralEx[ , r(130 , 135 ) ] spectraSubsetHours <- spectralEx[ r( 1 , 3 ) , r(130 , 135 ) , timeUnit = "hours" ] closestSpectralVals <- spectralEx[ , e( 150, 4, 300, 500 ) ] # remark only unique values spectraSubsetLogical <- spectralEx[ getTimePoints( spectralEx ) > 300 , getSpectralAxis( spectralEx ) <= 500 ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.