Learn R Programming

ir (version 0.4.1)

Functions to Handle and Preprocess Infrared Spectra

Description

Functions to import and handle infrared spectra (import from '.csv' and Thermo Galactic's '.spc', baseline correction, binning, clipping, interpolating, smoothing, averaging, adding, subtracting, dividing, multiplying, atmospheric correction, 'tidyverse' methods, plotting).

Copy Link

Version

Install

install.packages('ir')

Monthly Downloads

217

Version

0.4.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Henning Teickner

Last Published

April 6th, 2025

Functions in ir (0.4.1)

ir_get_wavenumberindex

Gets the index of a defined wavenumber value for a spectrum
ir_add

Add infrared spectra
ir_new_ir_flat

Creates an object of class ir_flat
ir_drop_spectra

Drops the column spectra from an object is of class ir
ir_identify_empty_spectra

Identifies empty spectra in an ir object
ir_divide

Divide infrared spectra or divide infrared spectra by a numeric value
ir_export_prepare

Prepares ir objects for export to csv
ir_correct_atmosphere

Corrects artifacts in a spectrum based on reference spectra of the artifact compound
ir_interpolate

Interpolates intensity values of infrared spectra in an ir object for new wavenumber values
ir_as_ir

Converts an object to class ir
ir_interpolate_region

Interpolates selected regions in infrared spectra in an ir object
ir_normalize

Normalizes infrared spectra in an ir object
filter-joins

Filtering joins for an ir object
ir_get_intensity

Extracts intensities from spectra in an ir object for specific spectral channels
ir_average

Averages infrared spectra within groups
ir_subtract

Subtract infrared spectra
ir_get_spectrum

Extracts selected spectra from an object of class ir
ir_to_transmittance

Converts absorbance spectra to transmittance spectra or vice versa
ir_bin

Bins infrared spectra
ir_bc

Performs baseline correction on infrared spectra
range

Get the minima/maxima/range/median of x axis values or intensity values of infrared spectra
ir_bc_rubberband

Performs baseline correction on infrared spectra using a rubberband algorithm
%>%

Pipe operator
separate_rows.ir

Separate a collapsed column in an ir object into multiple rows
ir_bc_sg

Performs baseline correction on infrared spectra using a Savitzky-Golay baseline
unite.ir

Unite multiple columns in an ir object into one by pasting strings together
pivot_longer.ir

Pivot an ir object from wide to long
slice

Subset rows in ir objects using their positions
ir_import_csv

Imports infrared spectra from various files
ir_import_spc

Imports infrared spectra from Thermo Galactic's files
ir_bc_polynomial

Performs baseline correction on infrared spectra using a polynomial
ir_flatten

Converts objects of class ir to objects of class ir_flat
ir_flat_clean

Cleans objects of class ir_flat
rename

Rename columns in ir objects
ir_sample_prospectr

Wrapper to sampling functions from the 'prospectr' package
subsetting

Subsetting ir objects
summarize

Summarize each group in a ir object to fewer rows
ir_clip

Clips infrared spectra to new wavenumber ranges
ir_smooth

Smooths infrared spectra in an ir object
separate.ir

Separate a character column in an ir object into multiple columns with a regular expression or numeric locations
ir_stack

Stacks a matrix or data frame with spectra into a list column
ir_scale

Scales spectra in an ir object
select.ir

Subset columns in ir objects using column names and types
ir_new_ir

Creates an object of class ir
ir_multiply

Multiply infrared spectra or multiply infrared spectra with a numeric value
ir_remove_missing

Removes empty data values in an object of class ir
ir_variance_region

Computes the variance of a spectrum in an ir object in a given region
ir_sample_data

Sample object of class ir
mutate-joins

Mutating joins for an ir object
plot.ir

Plots an object of class ir
mutate

Mutate an ir object by adding new or replacing existing columns
nest

Nest and un-nest an ir object
pivot_wider.ir

Pivot an ir object from wide to long
rowwise.ir

Group input ir objects by rows
rep.ir

Replicate ir objects
Ops.ir

Arithmetic operations for ir objects
ir-package

ir: Functions to Handle and Preprocess Infrared Spectra
bind

Bind rows of ir objects
distinct.ir

Subset distinct/unique rows in ir objects
extract.ir

Extract a character column in an ir object into multiple columns using regular expression groups
arrange.ir

Arrange rows in ir objects by column values
group_by

Group rows in ir objects by one or more variables
filter.ir

Subset rows in ir objects using column values