lightr v1.3


Monthly downloads



Read Spectrometric Data and Metadata

Parse various reflectance/transmittance/absorbance spectra file formats to extract spectral data and metadata, as described in Gruson, White & Maia (2019) <doi:10.21105/joss.01857>. Among other formats, it can import files from 'Avantes' <>, 'CRAIC' <>, and 'OceanInsight' (formerly 'OceanOptics') <> brands.


lightr: import spectral data in R

CRAN version Dependencies R build status Coverage status Reviewed by rOpenSci JOSS paper

There is no standard file format for spectrometry data and different scientific instrumentation companies use wildly different formats to store spectral data. Vendor proprietary software sometimes has an option but convert those formats instead human readable files such as csv but in the process, most metadata are lost. However, those metadata are critical to ensure reproducibility (White et al, 2015).

This package aims at offering a unified user-friendly interface for users to read UV-VIS reflectance/transmittance/absorbance spectra files from various formats in a single line of code.

Additionally, it provides for the first time a fully free and open source solution to read proprietary spectra file formats on all systems.


Functions in lightr

Name Description
compute_processed Compute processed spectral data
lr_parse_jaz Parse OceanInsight converted file
lr_parse_generic Generic function to parse spectra files that don't have a specific parser
lr_get_metadata Extract metadata from spectra files
lr_parse_procspec Parse OceanInsight ProcSpec file
lr_parse_jdx Parse OceanInsight JCAMP-DX (.jdx) file
dispatch_parser Internal function to dispatch files to the correct parser
lr_get_spec Extract spectral data from spectra files
lr_parse_ttt Parse Avantes converted file
lightr-package lightr: Read Spectrometric Data and Metadata
lr_convert_tocsv Convert spectral data files to csv files
lr_parse_trm Parse Avantes binary file
lr_parse_spc Parse SPC binary file
No Results!

Vignettes of lightr

No Results!

Last month downloads


Include our badge in your README