SpectraInTime-class: SpectraInTime-class (time resolved spectra ) wavelength-time...

Description Usage Arguments Value Slots Author(s) Examples

Description

SpectraInTime-class (time resolved spectra ) wavelength-time data for 1 experiment

extract summary specs from SpectraInTime-class by wavelengths over time

convert to data.frame (used in visualization)

Plotting methods for 'spectralAnalysis'

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## S4 method for signature 'SpectraInTime'
dim(x)

extractSummarySpecs(object, summaryFunctions = getDefaultSumFunc())

## S4 method for signature 'SpectraInTime'
summary(object,
  summaryFunctions = getDefaultSumFunc())

## S4 method for signature 'SummaryByWavelengths'
show(object)

## S4 method for signature 'SpectraInTime'
as.data.frame(x, timePointsAlt = FALSE,
  timeUnit = "seconds")

## S4 method for signature 'SpectraInTime,missing'
plot(x, y, type = "3D",
  timeUnit = "hours", timePointsAlt = FALSE, colors = "D")

## S3 method for class 'list'
plot(x, ...)

Arguments

x

the object to be plotted

object
summaryFunctions

a character vector of summary functions

timePointsAlt

see getTimePoints

timeUnit

see getTimePoints

y

not used, for consitency with plot method

type

character choice of plot type between: * 3D surface plot (default) * wavelenth wavelength in legend, time on the axis * time time in legend, wavelength on the axis

colors

colorblind friendly palettes are used from the de viridis_pal choice between code"A" (magna), code"B" (inferno), "C" (plasma) and "D" the default viridis color palette

...

additional argument, for plotting a list of spectra one can use:

  • times numeric vector of time points to plot

  • timeUnit time unit for times default to "seconds"

  • timePointsAlt logical value indicating whether alternative time axis should be used, defaults to FALSE

object

SpectraInTime-class

summaryFunctions

character vector of summary functions

Value

data.frame with first column wavelengths followed

a data.frame containing spectral information in long format

Slots

spectra

matrix of spectral measurement with as rows timePoints and columns wavelengths

experimentName

character vector with name of the experiment

wavelengths

numeric vector of wavelengths

timePoints

of measurement in seconds

timePointsAlt

numeric vector of shifted time points in order to time align multiple spectral measurements in plots, by default equal to timePoints

extraInfo

list additional information such as probe type

startTime

start date and time POSIXct format

units

list with information on measurement units

preprocessing

list of preprocessing steps in taken in order

Author(s)

Adriaan Blommaert

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  spectralExample   <-  getSpectraInTimeExample()
  mimMaxSpec        <-  spectralAnalysis:::extractSummarySpecs( spectralExample ,
 c( "min" , "max" ) )

 spectralExample  <-  getSpectraInTimeExample() 
 summarySpectra   <-  summary( spectralExample )
 str( summarySpectra )
 summarySpectra

## convert to data.frame
spectra                 <-  getSpectraInTimeExample()
spectraFlat             <-  as.data.frame( spectra )


### visualization 
  ## Not run: 
  data = getSpectraInTimeExample()
  plot( x =  data , type = "3D" , timeUnit = "hours" , timePointsAlt = FALSE )
  plot( x =  data[  , r(500, 350) ] , type = "3D" ,
      timeUnit = "hours" , timePointsAlt = TRUE , colors = "B"  )
  plot( x =  data[ e( 1 , 2 , 3) , , timeUnit = "hours" ] ,
      type = "time" , timeUnit = "hours" , timePointsAlt = FALSE ) 
  plot( x =  data[ , e( seq( 200 , 400 , 50 ) ) ] , 
     type = "wavelength" , timeUnit = "minutes" , timePointsAlt = TRUE , colors = "A" )

## End(Not run)

  
 ## plotting a list of spectra
    
 listOfSpectra     <-  getListOfSpectraExample()
 plot( listOfSpectra , times = 1 , timeUnit = "hours" )
 plot( listOfSpectra , times = 1 , timeUnit = "hours" , timePointsAlt = TRUE  )
 plot( listOfSpectra , times = 1:3 , timeUnit = "hours" , colors = "B" ) 

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