Learn R Programming

⚠️There's a newer version (0.100.3) of this package.Take me there.

hyperSpec (version 0.99-20201127)

Work with Hyperspectral Data, i.e. Spectra + Meta Information (Spatial, Time, Concentration, ...)

Description

Comfortable ways to work with hyperspectral data sets. I.e. spatially or time-resolved spectra, or spectra with any other kind of information associated with each of the spectra. The spectra can be data as obtained in XRF, UV/VIS, Fluorescence, AES, NIR, IR, Raman, NMR, MS, etc. More generally, any data that is recorded over a discretized variable, e.g. absorbance = f (wavelength), stored as a vector of absorbance values for discrete wavelengths is suitable.

Copy Link

Version

Install

install.packages('hyperSpec')

Monthly Downloads

1,493

Version

0.99-20201127

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Claudia Beleites

Last Published

November 29th, 2020

Functions in hyperSpec (0.99-20201127)

bind

Binding hyperSpec Objects
as.data.frame

Conversion of a hyperSpec object into a data.frame or matrix as.data.frame returns x@data (as data.frame) as.matrix returns the spectra matrix x@data$spc as matrix
colSums

colSums, colMeans, rowSums and rowMeans functions for hyperSpec objects
chondro

Raman spectra of 2 Chondrocytes in Cartilage A Raman-map (laterally resolved Raman spectra) of chondrocytes in cartilage.
.read.spe.xml_string

.read.spe.xml_string
aggregate

aggregate hyperSpec objects
dimnames,hyperSpec-method

dimnames for hyperSpec objects
.read.spe.xml

Read XML footer from SPE file format version 3.0
.fix_spc_colnames

Ensure that the spectra matrix has the wavelengths in column names
.cluster.wavelengths

Find clusters of approximately equal wavelengths
ncol,hyperSpec-method

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

apply Computes summary statistics for the spectra of a hyperSpec object.
.DollarNames.hyperSpec

command line completion for $
droplevels,hyperSpec-method

droplevels for hyperSpec object
markpeak

Mark peak Marks location of the first spectrum at the data point closest to the specified position on the current plot.
mark.dendrogram

empty

Empty hyperSpec object
barbiturates

Barbiturates Spectra from .spc example files A time series of mass spectra in a list of hyperSpec objects.
count_lines

count lines (of an ASCII file)
.collapse.equal

Try finding groups of hyperSpec objects with (approximately) equal wavelength axes
collapse

Collapse hyperSpec objects
spc.fit.poly

Polynomial Baseline Fitting These functions fit polynomal baselines.
[,hyperSpec-method

Extract and Replace parts of hyperSpec objects
labels<-

Get and Set Labels of a hyperSpec Object value may be a list or vector of labels giving the new label for each of the entries specified by which.
initialize

Creating a hyperSpec Object
plotspc

Plotting Spectra Plot the spectra of a hyperSpec object, i.e. intensity over wavelength. Instead of the intensity values of the spectra matrix summary values calculated from these may be used.
.fileio.optional

Helper function to harmonize treatment of file import results
normalize01

normalization for mixed colors
merge,hyperSpec,hyperSpec-method

Merge hyperSpec objects
mean_sd,numeric-method

Mean and Standard Deviation Calculate mean and standard deviation, and mean, mean \(\pm\) one standard deviation, respectively.
qplotmap

Spectra plotting with ggplot2
legendright

Plot multivariate data into colour channels
Math2,hyperSpec-method

Math Functions for hyperSpec Objects
laser

Laser Emission A time series of an unstable laser emission.
quickdf

Quick data frame. Experimental version of as.data.frame that converts a list to a data frame, but doesn't do any checks to make sure it's a valid format. Much faster.
Comparison

Comparison of hyperSpec objects
read.spe

Import WinSpec SPE file
Arith

Arithmetical Operators for hyperSpec objects
qplotc

Spectra plotting with ggplot2
read.txt.Horiba

Import Horiba Labspec exported ASCII files
plotmap

Plot a Map and Identify/Select Spectra in the Map levelplot functions for hyperSpec objects. An image or map of a summary value of each spectrum is plotted. Spectra may be identified by mouse click.
cov,hyperSpec,missing-method

Covariance matrices for hyperSpec objects
decomposition

Convert Principal Component Decomposition or the like into a hyperSpec Object
scan.asc.Andor

File Import Andor Solis
scan.txt.Witec

File Import Witec Raman
flu

Quinine Fluorescence Spectra Fluorescence spectra of different dilutions of quinine forming a calibration set.
rmmvnorm

Multivariate normal random numbers
hyperSpec-class

Class "hyperSpec" This class handles hyperspectral data sets, i.e. spatially or time-resolved spectra, or spectra with any other kind of information associated with the spectra.
read.spc.Kaiser

read Kaiser .spc files
read.asc.PerkinElmer

File import filter PerkinElmer ASCII spectra
hyperSpec-package

Package hyperSpec
wc

line/word/character count of ASCII files
read.ini

Read INI files
rbind.fill.matrix

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

Getting and Setting the Wavelength Axis wl returns the wavelength axis, wl<- sets it.
spc.rubberband

Rubberband baseline correction
spc.loess

spc.bin

Wavelength Binning In order to reduce the spectral resolution and thus gain signal to noise ratio or to reduce the dimensionality of the spectral data set, the spectral resolution can be reduced.
orderwl

Sorting the Wavelengths of a hyperSpec Object Rearranges the hyperSpec object so that the wavelength vector is in increasing (or decreasing) order.
spc.identify

guess.wavelength

guess wavelengths from character vector
matlab.palette

Matlab-like Palettes Two palettes going from blue over green to red, approximately as the standard palette of Matlab does. The second one has darker green values and is better suited for plotting lines on white background.
qplotmixmap

qplotmap with colour mixing for multivariate overlay
qplotspc

Spectra plotting with ggplot2
plotc

Calibration- and Timeseries Plots, Depth-Profiles and the like plotc plots intensities of a hyperSpec object over another dimension such as concentration, time, or a spatial coordinate.
paracetamol

Paracetamol Spectrum A Raman spectrum of a paracetamol tablet.
hy.getOptions

Options for package hyperSpec Functions to access and set hyperSpec's options.
plotmat

Plot spectra matrix
scale,hyperSpec-method

Center and scale hyperSpec object
sample,hyperSpec-method

Random Samples and Permutations Take a sample of the specified size from the elements of x with or without replacement.
Summary

The functions
wlconv

Convert different wavelength units
spc.smooth.spline

Spectral smoothing by splines
sweep

spc.NA.approx

Impute missing data points
makeraster

makeraster
map.sel.poly

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

Import of ENVI data as hyperSpec object
read.spc

Import for Thermo Galactic's spc file format These functions allow to import Thermo Galactic/Grams .spc files.
read.txt.Shimadzu

Reads Shimadzu GCxGC-qMS - Spectra Files (.txt) as exported by Shimadzu Chrome Solution (v. 2.72) Mass Spectrometer: Shimadzu GCMS-QP 2010 Ultra (www.shimadzu.com)
scan.txt.Renishaw

import Raman measurements from Renishaw ASCII-files
trellis.factor.key

Color coding legend for factors Modifies a list of lattice arguments (as for levelplot, etc.) according to the factor levels. The colorkey will shows all levels (including unused), and the drawing colors will be set accordingly.
read.txt.long

Import and Export of hyperSpec objects Besides save and load, two general ways to import and export data into hyperSpec objects exist.
hy.unittest

hyperSpec unit tests
vanderMonde

Function evaluation on hyperSpec objects
pearson.dist

Distance based on Pearson's \(R^2\)
plot-methods

Plotting hyperSpec Objects
read.jdx

JCAMP-DX Import for Shimadzu Library Spectra
seq.hyperSpec

Sequence generation along spectra or wavelengths This function generates sequences along the spectra (rows) or wavelengths of hyperSpec objects.
read.cytomat

Import for Cytospec mat files
as.character,hyperSpec-method

Convert a hyperSpec object to character strings for Display print, show, and summary show the result of as.character.
wl.eval

Evaluate function on wavelengths of hyperSpec object
wl2i

Conversion between Wavelength and Spectra Matrix Column Index wl2i returns the column indices for the spectra matrix for the given wavelengths. i2wl converts column indices into wavelengths.
subset

subset
split

Split a hyperSpec object according to groups split divides the hyperSpec object into a list of hyperSpec objects according to the groups given by f.
as.hyperSpec

as.hyperSpec: convenience conversion functions
chk.hy

Validation of hyperSpec objects