subset-methods: Subsetting 'SpectraInTime-class'

Description Usage Arguments Examples

Description

Subsetting SpectraInTime-class

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'SpectraInTime,ANY,ANY,ANY'
x[i, j, ..., drop = ""]

## S4 method for signature 'SpectraInTime,missing,ANY,ANY'
x[i, j, ..., drop = ""]

## S4 method for signature 'SpectraInTime,ANY,missing,ANY'
x[i, j, ..., drop = ""]

## S4 method for signature 'SpectraInTime,missing,missing,ANY'
x[i, j, ..., drop = ""]

Arguments

x

object to subset

i

subsetting rows ( timePoints )

j

subsetting columns ( wavelengths )

...

additional parameters

  • timeUnit unit at which subsetting should be done choose between seconds , minutes or hours defaults to seconds

  • timePointsAlt logical indicators whater alternative timePoints should be used

drop

for consistancy, not used

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 ### subsetting [ time , wavelength, options ]

 spectralEx                <-  getSpectraInTimeExample()
 spectraSubset             <-  spectralEx[ r( 1000 , 30000 ) , r(130 , 135 ) ]
 spectraSubsetTime         <-  spectralEx[ r( 1000 , 30000 ) ,  ]
 spectraSubsetWavelengths  <-  spectralEx[  ,  r(130 , 135 ) ]
 spectraSubsetHours        <-  spectralEx[ r( 1 , 3 ) , r(130 , 135 ) , timeUnit = "hours" ]
 closestWavelengths        <-  spectralEx[ , e( 150, 4, 300, 500 ) ] # remark only unique values 
 spectraSubsetLogical      <-  spectralEx[ getTimePoints( spectralEx ) > 300   ,
    getWavelengths( spectralEx ) <= 500 ]

spectralAnalysis documentation built on June 12, 2018, 5:04 p.m.