1. Package and class "hyperSpec"

hyperSpec-package

Package "hyperSpec": Interface for Hyperspectral Data Sets

hyperSpec-class

Class hyperSpec

2. Utility functions

chk.hy()

Validation of hyperSpec Objects

.DollarNames(<hyperSpec>)

Command Line Completion for $

hy.getOptions() hy.getOption() hy.setOptions()

Options for package hyperSpec.

3. Datasets

Datasets to try functionality of hyperSpec functions.

barbiturates

Barbiturates Spectra from .spc Example Files

generate_faux_cell() faux_cell

Faux Cell Data Set for Testing & Demonstration

flu

Quinine Fluorescence Spectra

laser

Laser Emission Dataset

paracetamol

Paracetamol Spectrum.

4. Input and output

Create or convert from/into `hyperSpec`

initialize(<hyperSpec>)

Creating a hyperSpec Object

as.hyperSpec()

as.hyperSpec: Convenience Conversion Functions

as.data.frame(<hyperSpec>) as.matrix(<hyperSpec>) as.wide.df() as.long.df() as.t.df()

Conversion of a hyperSpec Object into a Data Frame or Matrix

Read/Write from/to files

count_lines()

Count Lines (of an ASCII File)

.read.spe.xml()

Read XML footer from SPE file format version 3.0.

read.ini()

Read INI files.

read.spc.Kaiser() read.spc.KaiserMap() read.spc.KaiserLowHigh()

read Kaiser .spc files

read.spc()

Import for Thermo Galactic's spc file format.

read.ENVI() read.ENVI.HySpex() read.ENVI.Nicolet()

Import of ENVI data.

read.asc.Andor()

Import Raman Spectra/Maps from Andor Cameras/Solis ASCII files.

read.asc.PerkinElmer()

File import filter PerkinElmer ASCII spectra.

read.jdx()

JCAMP-DX Import for Shimadzu Library Spectra.

read.mat.Cytospec()

Import for Cytospec mat files.

read.spe() spe.showcalpoints()

Import WinSpec SPE file.

read.txt.Horiba() read.txt.Horiba.xy() read.txt.Horiba.t()

Import Horiba Labspec exported ASCII files

read.txt.Renishaw() read.zip.Renishaw()

Import Raman measurements from Renishaw ASCII-files.

read.txt.Shimadzu()

Reads Shimadzu GCxGC-qMS - Spectra Files (.txt).

read.txt.Witec() read.dat.Witec() read.txt.Witec.Graph()

File Import Witec Raman

read.txt.long() read.txt.wide() write.txt.long() write.txt.wide()

Import and Export of hyperSpec objects.

5. Plotting

Plots

plot(<hyperSpec>,<missing>) plot(<hyperSpec>,<character>)

Plotting hyperSpec Objects.

plotmap() levelplot(<hyperSpec>,<missing>) levelplot(<formula>,<hyperSpec>) map.identify() plotvoronoi()

Plot a Map and Identify/Select Spectra in the Map.

plotc()

Calibration Plots, Timeseries Plots, and Depth-Profiles.

plotmat()

Plot spectra matrix.

plotspc() stacked.offsets()

Plotting Spectra.

Color palettes

CB7

Color Suggestions for hyperSpec Users

matlab.palette() matlab.dark.palette() alois.palette()

Matlab-Like Color Palettes

Plotting tools

plotmap() levelplot(<hyperSpec>,<missing>) levelplot(<formula>,<hyperSpec>) map.identify() plotvoronoi()

Plot a Map and Identify/Select Spectra in the Map.

map.sel.poly() sel.poly()

Interactively select a polygon (grid graphics) and highlight points.

mark.dendrogram()

Mark groups in stats::hclust() dendrograms

markpeak()

Mark peak.

spc.identify() spc.point.max() spc.point.default() spc.point.min() spc.point.sqr() spc.label.default() spc.label.wlonly()

Identifying Spectra and Spectral Data Points.

trellis.factor.key()

Color coding legend for factors.

! Moved to package hySpc.ggplot2

You should use analogous functions from package hySpc.ggplot2 as these functions will be removed soon.

qplotspc() qplotmap() qplotc() qplotmixmap() legendright() qmixtile() normalize.colrange() normalize.range() normalize.null() normalize.minmax() qmixlegend() colmix.rgb()

Spectra Plotting with ggplot2 Was Moved to hySpc.ggplot2 (DEPRECATED)

6. Data manipulation

Summary and data preview

ncol(<hyperSpec>) nrow(<hyperSpec>) nwl() dim(<hyperSpec>) length(<hyperSpec>)

The Number of Rows (Spectra), Columns, and Data Points per Spectrum of a hyperSpec Object

Manipulation

Arith(<hyperSpec>,<hyperSpec>) Arith(<hyperSpec>,<missing>) Arith(<hyperSpec>,<numeric>) Arith(<hyperSpec>,<matrix>) Arith(<numeric>,<hyperSpec>) Arith(<matrix>,<hyperSpec>) `%*%`(<hyperSpec>,<hyperSpec>) `%*%`(<hyperSpec>,<matrix>) `%*%`(<matrix>,<hyperSpec>)

Arithmetical Operators: +, -, *, /, ^, %%, %/%, %*% for hyperSpec Objects

Compare(<hyperSpec>,<hyperSpec>) Compare(<hyperSpec>,<numeric>) Compare(<hyperSpec>,<matrix>) Compare(<numeric>,<hyperSpec>) Compare(<matrix>,<hyperSpec>) all.equal(<hyperSpec>,<hyperSpec>)

Comparison of hyperSpec objects

aggregate(<hyperSpec>)

Aggregate hyperSpec Objects

apply(<hyperSpec>)

Compute Summary Statistics for the Spectra of a hyperSpec Object

bind() cbind(<hyperSpec>) rbind(<hyperSpec>) cbind2(<hyperSpec>,<hyperSpec>) cbind2(<hyperSpec>,<missing>) rbind2(<hyperSpec>,<hyperSpec>) rbind2(<hyperSpec>,<missing>)

Binding hyperSpec Objects

collapse()

Collapse/Bind Several hyperSpec Objects into One Object

decomposition()

Convert Principal Component Decomposition or the Like into a hyperSpec Object

dimnames(<hyperSpec>) rownames(<hyperSpec>) `rownames<-`(<hyperSpec>) colnames(<hyperSpec>) `colnames<-`(<hyperSpec>)

Dimnames for hyperSpec Objects

.fix_spc_colnames()

Ensure That the Spectra Matrix Has the Wavelengths in Column Names

droplevels(<hyperSpec>)

Droplevels for hyperSpec Objects

empty()

Empty hyperSpec Object

`[`(<hyperSpec>) `[[`(<hyperSpec>) `$`(<hyperSpec>) `[<-`(<hyperSpec>) `[[<-`(<hyperSpec>) `$<-`(<hyperSpec>)

Extract and Replace Parts of hyperSpec Objects

makeraster() fitraster()

Find an evenly spaced grid for x.

Math2(<hyperSpec>) log(<hyperSpec>) Math(<hyperSpec>)

Mathematical Functions for hyperSpec Objects.

mean_sd(<numeric>) mean_sd(<matrix>) mean_sd(<hyperSpec>) mean_pm_sd(<numeric>) mean_pm_sd(<matrix>) mean_pm_sd(<hyperSpec>) mean(<hyperSpec>) quantile(<hyperSpec>)

Mean and Standard Deviation.

merge(<hyperSpec>,<hyperSpec>) merge(<hyperSpec>,<data.frame>) merge(<data.frame>,<hyperSpec>)

Merge hyperSpec objects.

mergeextra()

Merge additional extra data into an object.

normalize01()

Normalize numbers to interval [0, 1].

rbind.fill(<matrix>) rbind(<fill>)

Bind matrices by row, and fill missing columns with NA.

scale(<hyperSpec>)

Center and scale hyperSpec object.

seq(<hyperSpec>)

Sequence generation along spectra or wavelengths.

spc.NA.approx()

Impute Missing Data Points

split(<hyperSpec>)

Split a hyperSpec object according to groups.

subset(<hyperSpec>)

Subset for hyperSpec object.

sweep(<hyperSpec>)

Sweep Summary Statistic out of an hyperSpec Object.

Baseline manipulation

spc.fit.poly() spc.fit.poly.below()

Polynomial Baseline Fitting.

spc.rubberband()

Rubberband baseline correction.

Binning and smoothing

spc.bin()

Wavelength Binning

spc.loess()

LOESS Smoothing Interpolation for Spectra

spc.smooth.spline()

Spectral smoothing by splines.

Data generation functions

generate_faux_cell() faux_cell

Faux Cell Data Set for Testing & Demonstration

generate_hy_spectra() generate_hy_profile() generate_hy_map()

Generate Spectroscopic Data

rmmvnorm()

Multivariate normal random numbers.

vanderMonde()

Function evaluation on hyperSpec objects.

Statistics, analysis, randomization

aggregate(<hyperSpec>)

Aggregate hyperSpec Objects

apply(<hyperSpec>)

Compute Summary Statistics for the Spectra of a hyperSpec Object

colMeans(<hyperSpec>) colSums(<hyperSpec>) rowMeans(<hyperSpec>) rowSums(<hyperSpec>)

Functions colSums(), colMeans(), rowSums(), and rowMeans() for hyperSpec Objects

cov(<hyperSpec>,<missing>) pooled.cov()

Covariance Matrices for hyperSpec Objects

mean_sd(<numeric>) mean_sd(<matrix>) mean_sd(<hyperSpec>) mean_pm_sd(<numeric>) mean_pm_sd(<matrix>) mean_pm_sd(<hyperSpec>) mean(<hyperSpec>) quantile(<hyperSpec>)

Mean and Standard Deviation.

pearson.dist()

Distance based on Pearson's \(R^2\).

sample(<hyperSpec>) isample() sample(<data.frame>) sample(<matrix>)

Random Samples and Permutations.

Summary(<hyperSpec>) is.na(<hyperSpec>) all_wl() any_wl()

Statistical summary and other functions for hyperSpec.

sweep(<hyperSpec>)

Sweep Summary Statistic out of an hyperSpec Object.

Wavelength manipulation

guess.wavelength()

Guess wavelengths from Character Vector

orderwl()

Sorting the Wavelengths of a hyperSpec Object.

wl() `wl<-`()

Getting and Setting the Wavelength Axis.

wl.eval()

Evaluate function on wavelengths of hyperSpec object.

wl2i() i2wl()

Conversion between Wavelength and Spectra Matrix Column.

wlconv() nm2raman() nm2invcm() nm2ev() nm2freq() invcm2raman() invcm2nm() invcm2ev() invcm2freq() raman2invcm() raman2nm() raman2ev() raman2freq() ev2raman() ev2invcm() ev2nm() ev2freq() freq2nm() freq2invcm() freq2ev() freq2raman()

Convert different wavelength units.

Label manipulation

`labels<-`() labels(<hyperSpec>)

Get and Set Labels of a hyperSpec Object

8. Other functions

Functions not mentioned above.

as.character(<hyperSpec>) show(<hyperSpec>) print(<hyperSpec>) summary(<hyperSpec>)

Convert a hyperSpec object to character strings for display.

9. Removed or deprecated functions

Functions moved to other packages

You should use analogues of these functions from appropriate packages.

qplotspc() qplotmap() qplotc() qplotmixmap() legendright() qmixtile() normalize.colrange() normalize.range() normalize.null() normalize.minmax() qmixlegend() colmix.rgb()

Spectra Plotting with ggplot2 Was Moved to hySpc.ggplot2 (DEPRECATED)

Deprecated, renamed, or defunct functions

You should not use these functions any more.

scan.asc.Andor() scan.txt.Renishaw() scan.zip.Renishaw() scan.txt.Witec() scan.dat.Witec() scan.txt.Witec.Graph() read.cytomat()

Deprecated and Defunct Functions

wc()

Line/word/character count of ASCII files (DEPRECATED).