Package: ir 0.4.2

ir: Functions to Handle and Preprocess Infrared Spectra

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

Authors:Henning Teickner [aut, cre, cph]

ir_0.4.2.tar.gz
ir_0.4.2.zip(r-4.7)ir_0.4.2.zip(r-4.6)ir_0.4.2.zip(r-4.5)
ir_0.4.2.tgz(r-4.6-any)ir_0.4.2.tgz(r-4.5-any)
ir_0.4.2.tar.gz(r-4.7-any)ir_0.4.2.tar.gz(r-4.6-any)
ir_0.4.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
ir/json (API)

# Install 'ir' in R:
install.packages('ir', repos = c('https://henningte.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/henningte/ir/issues

Pkgdown/docs site:https://henningte.github.io

Datasets:

On CRAN:

Conda:

chemometricsinfraredinfrared-spectrair-packagemid-infrared-spectraspectroscopy

5.86 score 9 stars 40 scripts 324 downloads 38 exports 61 dependencies

Last updated from:6f8d6757a0. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK188
source / vignettesOK317
linux-release-x86_64OK167
macos-release-arm64OK163
macos-oldrel-arm64OK189
windows-develOK156
windows-releaseOK121
windows-oldrelOK124
wasm-releaseOK177

Exports:%>%ir_addir_as_irir_averageir_bcir_bc_polynomialir_bc_rubberbandir_bc_sgir_binir_clipir_correct_atmosphereir_divideir_drop_spectrair_export_prepareir_flat_cleanir_flattenir_get_intensityir_get_spectrumir_get_wavenumberindexir_identify_empty_spectrair_import_csvir_import_spcir_interpolateir_interpolate_regionir_multiplyir_new_irir_new_ir_flatir_normaliseir_normalizeir_remove_missingir_sample_prospectrir_scaleir_smoothir_stackir_subtractir_to_absorbanceir_to_transmittanceir_variance_region

Dependencies:briocallrclicpp11crayondeldirdescdiffobjdplyrevaluatefarverfsgenericsggplot2gluegtablehyperSpecinterpisobandjpegjsonlitelabelinglatticelatticeExtralazyevallifecyclemagrittrMASSotelpillarpkgbuildpkgconfigpkgloadpngpraiseprocessxpspurrrR6rbibutilsRColorBrewerRcppRcppEigenRdpackrlangrprojrootS7scalesstringistringrtestthattibbletidyrtidyselectunitsutf8vctrsviridisLitewaldowithrxml2

Introduction to the 'ir' package
Introduction | Purpose | Structure | Preparation | Data import and export | Data import | csv files | Thermo Galactic's spc files | Data export | Plotting spectra | Spectral preprocessing | Baseline correction | Normalization | Smoothing | Derivative spectra | Clipping | Interpolating | Interpolating regions | Binning | Scaling | Building preprocessing pipelines | Further information | Sources | Session info | References

Last update: 2025-04-04
Started: 2022-06-13

Introduction to the irclass
Introduction | Purpose | Structure | Preparation | The ir class | Subsetting and modifying ir objects | Subsetting works as for data frames | Tidyverse methods are supported | Special functions to manipulate ir objects | Replicating data | Calculating with spectra | Further information | Sources | Session info | References

Last update: 2025-04-04
Started: 2022-06-13

Readme and manuals

Help Manual

Help pageTopics
Arrange rows in 'ir' objects by column valuesarrange.ir
Bind rows of 'ir' objectsbind cbind.ir rbind.ir
Subset distinct/unique rows in 'ir' objectsdistinct.ir
Extract a character column in an 'ir' object into multiple columns using regular expression groupsextract.ir
Filtering joins for an 'ir' objectanti_join.ir filter-joins semi_join.ir
Subset rows in 'ir' objects using column valuesfilter.ir
Group rows in 'ir' objects by one or more variablesgroup_by group_by.ir ungroup.ir
Add infrared spectrair_add
Converts an object to class 'ir'ir_as_ir ir_as_ir.data.frame ir_as_ir.hyperSpec ir_as_ir.ir ir_as_ir.ir_flat ir_as_ir.Spectra
Averages infrared spectra within groupsir_average
Performs baseline correction on infrared spectrair_bc
Performs baseline correction on infrared spectra using a polynomialir_bc_polynomial
Performs baseline correction on infrared spectra using a rubberband algorithmir_bc_rubberband
Performs baseline correction on infrared spectra using a Savitzky-Golay baselineir_bc_sg
Bins infrared spectrair_bin
Clips infrared spectra to new wavenumber rangesir_clip
Corrects artifacts in a spectrum based on reference spectra of the artifact compoundir_correct_atmosphere
Divide infrared spectra or divide infrared spectra by a numeric valueir_divide
Drops the column 'spectra' from an object is of class 'ir'ir_drop_spectra
Prepares 'ir' objects for export to 'csv'ir_export_prepare
Cleans objects of class 'ir_flat'ir_flat_clean
Converts objects of class 'ir' to objects of class 'ir_flat'ir_flatten
Extracts intensities from spectra in an 'ir' object for specific spectral channelsir_get_intensity
Extracts selected spectra from an object of class 'ir'ir_get_spectrum
Gets the index of a defined wavenumber value for a spectrumir_get_wavenumberindex
Identifies empty spectra in an 'ir' objectir_identify_empty_spectra
Imports infrared spectra from various filesir_import_csv
Imports infrared spectra from Thermo Galactic's filesir_import_spc
Interpolates intensity values of infrared spectra in an 'ir' object for new wavenumber valuesir_interpolate
Interpolates selected regions in infrared spectra in an 'ir' objectir_interpolate_region
Multiply infrared spectra or multiply infrared spectra with a numeric valueir_multiply
Creates an object of class 'ir'ir_new_ir
Creates an object of class 'ir_flat'ir_new_ir_flat
Normalizes infrared spectra in an 'ir' objectir_normalise ir_normalize
Removes empty data values in an object of class 'ir'ir_remove_missing
Sample object of class 'ir'ir_sample_data
Wrapper to sampling functions from the 'prospectr' packageir_sample_prospectr
Scales spectra in an 'ir' objectir_scale
Smooths infrared spectra in an 'ir' objectir_smooth
Stacks a matrix or data frame with spectra into a list columnir_stack
Subtract infrared spectrair_subtract
Converts absorbance spectra to transmittance spectra or vice versair_to_absorbance ir_to_transmittance
Computes the variance of a spectrum in an 'ir' object in a given regionir_variance_region
Mutate an 'ir' object by adding new or replacing existing columnsmutate mutate.ir transmute.ir
Mutating joins for an 'ir' objectfull_join.ir inner_join.ir left_join.ir mutate-joins right_join.ir
Nest and un-nest an 'ir' objectnest nest.ir unnest.ir
Arithmetic operations for 'ir' objectsOps.ir
Pivot an 'ir' object from wide to longpivot_longer.ir
Pivot an 'ir' object from wide to longpivot_wider.ir
Plots an object of class 'ir'plot.ir
Get the minima/maxima/range/median of x axis values or intensity values of infrared spectramax.ir median.ir min.ir range range.ir
Rename columns in 'ir' objectsrename rename.ir rename_with.ir
Replicate ir objectsrep.ir
Group input 'ir' objects by rowsrowwise.ir
Subset columns in 'ir' objects using column names and typesselect.ir
Separate a collapsed column in an 'ir' object into multiple rowsseparate_rows.ir
Separate a character column in an 'ir' object into multiple columns with a regular expression or numeric locationsseparate.ir
Subset rows in 'ir' objects using their positionsslice slice.ir slice_sample.ir
Subsetting 'ir' objects$.ir $<-.ir subsetting [.ir [<-.ir [[.ir [[<-.ir
Summarize each group in a 'ir' object to fewer rowssummarise summarise.ir summarize summarize.ir
Unite multiple columns in an 'ir' object into one by pasting strings togetherunite.ir