Spectroscopy Analysis Using the Tidy Data Philosophy
Standardize Spectral Data to Unit Variance
Scree plot for PCA results
Compute Wavenumber Contributions to Principal Components
Perform Principal Component Analysis (PCA) on Spectral Data
Apply Savitzky-Golay Smoothing to Spectral Data
Convert Spectral Data from Transmittance to Absorbance
Set the Default Wavenumber Column
Baseline Smoothing
Convert Absorbance Data to Transmittance
Rolling Ball Baseline Correction
Check the Currently Set Wavenumber Column
Usage Example and Test
Plot Rolling Ball Results
Enhanced Rolling Ball with Mathematical Morphology
Extract Rolling Ball Baseline from Spectral Data
Apply Rolling Ball Baseline Correction to Spectral Data
Apply Differentiation to Spectral Data
Filter spectral data by wavenumber range
Normalize Spectral Data to the [0, 1] Range
Normalize Spectral Data to a Specified Range
Read Spectral Data from Various File Formats
Select Specific Columns in a Spectral Data Frame
Create a Custom Plot for Spectral Data
Create an Interactive Plot for Spectral Data using Plotly
Apply Smoothing to Spectral Data Using a Moving Average
Enables the analysis of spectroscopy data such as infrared ('IR'), Raman, and nuclear magnetic resonance ('NMR') using the tidy data framework from the 'tidyverse'. The 'tidyspec' package provides functions for data transformation, normalization, baseline correction, smoothing, derivatives, and both interactive and static visualization. It promotes structured, reproducible workflows for spectral data exploration and preprocessing. Implemented methods include Savitzky and Golay (1964) "Smoothing and Differentiation of Data by Simplified Least Squares Procedures" <doi:10.1021/ac60214a047>, Sternberg (1983) "Biomedical Image Processing" <https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1654163>, Zimmermann and Kohler (1996) "Baseline correction using the rolling ball algorithm" <doi:10.1016/0168-583X(95)00908-6>, Beattie and Esmonde-White (2021) "Exploration of Principal Component Analysis: Deriving Principal Component Analysis Visually Using Spectra" <doi:10.1177/0003702820987847>, Wickham et al. (2019) "Welcome to the tidyverse" <doi:10.21105/joss.01686>, and Kuhn, Wickham and Hvitfeldt (2024) "recipes: Preprocessing and Feature Engineering Steps for Modeling" <https://CRAN.R-project.org/package=recipes>.