Learn R Programming

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

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")

Using spectrolab

This vignette introduces spectrolab, and walks you through the basics of the package.

This vignette shows how to match (splice) sensors.

Contributing

In an effort to keep things tidy and in running order, direct commits to master are discouraged. The master branch of the "meireles/spectrolab" fork is protected.

I also use a pre-commit hook in my local repo that prevents me from breaking my own policy! I suggest you do the same.

Copy Link

Version

Install

install.packages('spectrolab')

Monthly Downloads

421

Version

0.0.12

License

GPL-3

Maintainer

Jose Eduardo Meireles

Last Published

June 1st, 2021

Functions in spectrolab (0.0.12)

apply_by_band

Apply numeric function by band
as_spectra.data.frame

Convert data.frame to spectra
as.data.frame.spectra

Convert spectra to data.frame
bands<-

Set band labels
as.matrix.spectra

Convert spectra to matrix
as_spectra.matrix

Convert matrix to spectra
Ops.spectra

Arithmetic operators for spectra
aggregate.spectra

Aggregate spectra
i_plot_exists

Tests if a plot device exists
combine

Combine spectral datasets
default_spec_regions

Return default spectral regions matrix
bands

Get spectra band labels
i_mav

Moving Average
i_meta

Internal metadata constructor for spectra
as_spectra

Convert matrix or data frame to spectra
i_bands

Internal band constructor for spectra
i_is_index

Compatible with being an index?
mean.spectra

Mean spectrum
median.spectra

Median spectrum
sd.spectra

Standard deviation spectrum
sd.default

Default variance
dim.spectra

Get dimension of spectra
i_is_increasing

Is increasing
i_read_ascii_spectra

Internal parser for ASCII format
i_match_label

Match label
i_is_whole

Is whole number?
guess_splice_at

Guess splice bands (bounds between senors)
min.spectra

Minimum value
i_read_asd_spectra

Parser for ASD's `.asd`
plot_quantile

Plot spectra quantiles
i_trim_sensor_overlap

Trim sensor overlap
i_find_sensor_overlap_bounds

Find sensor overlap bounds
is_spectra

Is it a spectra object?
print.spectra

Print spectra
i_match_ij_spectra

Get internal indexes for spectra attributes
i_value

Internal constructor for value matrix
quantile.spectra

Compute spectra quantiles
names<-.spectra

Set spectra sample names
smooth_moving_avg

Smooth moving average for spectra
smooth.spectra

Smooth spectra
var.spectra

Variance spectrum
plot_regions

Plot polygons for spectral regions
i_match_label_or_idx

Match label or index
try_keep_txt

Wrap function to try to keep text
t.spectra

Spectra Transpose
var

Variance
read_spectra

Read files from various formats into `spectra`
range.spectra

Range of spectral values
meta<-

Set metadata
names.spectra

Get spectra sample names
meta

Get metadata
i_names

Internal constructor for sample names
i_plot_boundaries

Find plot boundaries in user space
var.default

Variance
resample

Resample spectra
sd

Standard deviation
smooth_spline

Smooth spline functions for spectra
smooth.default

Default smoothing function
summary.spectra

Summarize spectra
subset_by

Subset spectra by factor
smooth

Generic Smoothing function
normalize

Vector normalize spectra
match_sensors

Match spectra at sensor transitions
split.spectra

Split spectra
plot.spectra

Plot spectra
max.spectra

Maximum value
plot_interactive

Plot spectra interactively
spec_matrix_example

Example spectral dataset
spectrolab

Spectrolab
spectra

Spectra object constructor
[.spectra

Subset spectra
value<-

Set spectra value
value

Get spectra value
[<-.spectra

Assign values to spectra
str.spectra

Structure of the spectra object