spectralAnalysis (version 3.12.0)

subset-methods: Subsetting SpectraInTime-class

Description

Subsetting SpectraInTime-class

Usage

# S4 method for SpectraInTime,ANY,ANY,ANY
[(x, i, j, ..., drop = "")

# S4 method for SpectraInTime,missing,ANY,ANY [(x, i, j, ..., drop = "")

# S4 method for SpectraInTime,ANY,missing,ANY [(x, i, j, ..., drop = "")

# S4 method for 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

Run this code
# NOT RUN {
 ### 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 ]
# }

Run the code above in your browser using DataLab