Learn R Programming

spectrolab

Spectrolab is an R package that provides a class and methods for processing and visualizing high resolution spectra in R. It is licensed under GPL-3.

Installation

You can install spectrolab from Github using:

library("devtools")
install_github("meireles/spectrolab")

Or from CRAN using:

install.packages("spectrolab")

Copy Link

Version

Install

install.packages('spectrolab')

Monthly Downloads

314

Version

0.0.19

License

GPL-3

Maintainer

Jose Eduardo Meireles

Last Published

January 13th, 2025

Functions in spectrolab (0.0.19)

i_match_label

Match label
make_fwhm

Resample the FWHM to a new set of bands using a gaussian model
i_is_whole

Is whole number?
dim.spectra

Get dimension of spectra
plot_regions

Plot polygons for spectral regions
min.spectra

Minimum value
meta

Get metadata
combine

Combine spectral datasets
meta<-

Set metadata
median.spectra

Median spectrum
fwhm_from_band_diff

Get the FWHM from the difference between band values
i_match_label_or_idx

Match label or index
i_make_fwhm

Resample the FWHM to a new set of bands using a gaussian model
i_read_ascii_metadata

Read metadata
match_sensors

Match spectra at sensor transitions
default_spec_regions

Return default spectral regions matrix
i_plot_exists

Tests if a plot device exists
plot_quantile

Plot spectra quantiles
plot_interactive

Plot spectra interactively
smooth_spline

Smooth spline functions for spectra
max.spectra

Maximum value
i_read_ascii_spectra

Internal parser for ASCII format
i_mav

Moving Average
is_spectra

Is it a spectra object?
i_verify_path_and_format

Internal function to verify file paths and format
spec_matrix_example

Example spectral dataset
print.spectra

Print spectra
t.spectra

Spectra Transpose
try_keep_txt

Wrap function to try to keep text
var.spectra

Variance spectrum
normalize

Vector normalize spectra
pairwise_indices

Pairwise indices
plot.spectra

Plot spectra
pairwise_ratio

Pairwise value ratios
sd

Standard deviation
value<-

Set spectra value
sd.default

Default standard deviation
value

Get spectra value
subset_by

Subset spectra by factor
summary.spectra

Summarize spectra
i_mind_the_gap_smoothing

Warn if gap between bands is too wide
i_trim_sensor_overlap

Trim sensor overlap
i_meta

Internal metadata constructor for spectra
i_value

Internal constructor for value matrix
names<-.spectra

Set spectra sample names
names.spectra

Get spectra sample names
mean.spectra

Mean spectrum
read_spectra

Read files from various formats into `spectra`
i_read_asd_spectra

Parser for ASD's `.asd`
smooth_fwhm

Smooth spectra with a gaussian model
smooth_moving_avg

Smooth moving average for spectra
sd.spectra

Standard deviation spectrum
spectra

Spectra object constructor
quantile.spectra

Compute spectra quantiles
smooth

Generic Smoothing function
smooth.spectra

Smooth spectra
resample

Resample spectra
spectrolab-package

Spectrolab
smooth.default

Default smoothing function
[.spectra

Subset spectra
range.spectra

Range of spectral values
var.default

Variance
var

Variance
[<-.spectra

Assign values to spectra
str.spectra

Structure of the spectra object
split.spectra

Split spectra
bands<-

Set band labels
aggregate.spectra

Aggregate spectra
Ops.spectra

Arithmetic operators for spectra
bands

Get spectra band labels
as_spectra.data.frame

Convert data.frame to spectra
apply_by_band

Apply numeric function by band
as.matrix.spectra

Convert spectra to matrix
as.data.frame.spectra

Convert spectra to data.frame
as_spectra.matrix

Convert matrix to spectra
as_spectra

Convert matrix or data frame to spectra
i_find_sensor_overlap_bounds

Find sensor overlap bounds
guess_splice_at

Guess splice bands (bounds between senors)
i_bands

Internal band constructor for spectra
i_is_increasing

Is increasing
i_match_ij_spectra

Get internal indexes for spectra attributes
i_index_pairwise_combn

Pairwise index combinations
i_is_index

Compatible with being an index?
i_names

Internal constructor for sample names
i_plot_boundaries

Find plot boundaries in user space