SpectraInTime-class | R Documentation |
Time resolved spectra for one experiment
## 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, ylab = "Wavelength", colors = "D", nColors = 200, limits = NULL ) ## S3 method for class 'list' plot(x, ..., type = "line", ncol = 2)
x |
the object to be plotted |
object |
|
summaryFunctions |
character vector of summary functions |
timePointsAlt |
see |
timeUnit |
time unit specification in the form of a character string |
y |
not used, for consitency with plot method |
type |
character choice of plot type between:
* |
ylab |
Specification y-axis label. By default this is "Wavelength", but can be different for e.g. mass spectra |
colors |
colorblind friendly palettes are used from the de |
nColors |
number of colours to use, only relevant if |
limits |
2-element numeric vector specifying the range of values onto which the color scale should be mapped (currently only relevant if |
... |
additional argument, for plotting a list of spectra one can use:
|
data.frame with first column wavelengths followed
a data.frame
containing spectral information in long format
data.frame
spectra
matrix of spectral measurement with as rows timePoints and columns spectral axis
experimentName
character vector with name of the experiment
spectralAxis
numeric vector of spectral values (e.g. wavelengths or mass to charge)
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
Adriaan Blommaert
spectralExample <- getSpectraInTimeExample() summarySpectra <- summary( spectralExample ) str( summarySpectra ) summarySpectra ## convert to data.frame spectra <- getSpectraInTimeExample() spectraFlat <- as.data.frame( spectra ) ### visualization 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 = "spectralAxis" , timeUnit = "minutes" , timePointsAlt = TRUE , colors = "A" ) plot( x = data , type = "contour" , nColors = 200 , colors = "C" , timeUnit = "seconds", timePointsAlt = TRUE) ## 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" ) plot( listOfSpectra , timeUnit = "hours" , colors = "C" , type = "contour" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.