Skip to content

lightr

Read Spectrometric Data and Metadata

v2.0.0 · Apr 10, 2026 · GPL (>= 2)

Description

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' <https://www.avantes.com/>, 'CRAIC' <https://www.microspectra.com/>, and 'OceanOptics'/'OceanInsight' <https://www.oceanoptics.com/> brands.

Downloads

CRAN

1K

Last 30 days

3605th

2.9K

Last 90 days

12.6K

Last year

Trend: +5.3% (30d vs prior 30d)

r2u CRAN

9

Last 30 days

44

Last 90 days

192

Last year

Trend: -18.2% (30d vs prior 30d)

autoCRAN

4

Last 7 days

20

Last 30 days

2

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘batch_import.Rmd’ using rmarkdown
Warning in file("", "w+b") :
  cannot open file '/tmp/RtmpijqccZ/Rf2624f81cd51990': No space left on device

Quitting from batch_import.Rmd:102-105 [unnamed-c
...[truncated]...
d re-building ‘renormalise.Rmd’

--- re-building ‘true_example.Rmd’ using rmarkdown
--- finished re-building ‘true_example.Rmd’

SUMMARY: processing the following file failed:
  ‘batch_import.Rmd’

Error: Vignette re-building failed.
Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Code

Structure

Lines of code

88,438

Files

154

Compiled share

0%

Has compiled src

No

Language breakdown

R 2,211 (2.5%)Tests 74,286 (84%)Docs 884 (1%)Vignettes 11,057 (12.5%)

API

Exported functions

32

Internal functions

10

Recent export changes

v2.0.0+14 lr_parse_avantes_abs, lr_parse_avantes_irr8, lr_parse_avantes_raw8 +11 more
v1.9.0+1 lr_parse_csv

Testing & CI

Has tests

Yes

Test-to-code ratio

33.60

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

10%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

60%

Unsafe pattern score

0

Dep constraint coverage

25%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.0.0

System requirements

C++ standard

License

GPL (>= 2)

License flags

SPDX valid, OSI approved

History

Versions

15

First release

2019-11-19

Latest release

2026-04-11

Avg cadence

100 days

Cold removal rate

Dep drift

4

LOC over versions

v0.1: 56,892 LOCv1.0: 12,851 LOCv1.1: 13,580 LOCv1.2: 13,616 LOCv1.3: 13,626 LOCv1.4: 15,218 LOCv1.5.0: 15,185 LOCv1.6.0: 15,277 LOCv1.6.1: 15,381 LOCv1.6.2: 15,384 LOCv1.7.0: 15,411 LOCv1.7.1: 15,477 LOCv1.8.0: 15,490 LOCv1.9.0: 88,050 LOCv2.0.0: 88,438 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (1)

imports

Dependency Network

Dependencies Reverse dependencies future.apply lifecycle progressr xml2 pavo lightr

Version History

16 tracked
updated 2.0.0 ← 1.9.0 diff Apr 11, 2026
new 1.9.0 Mar 10, 2026
updated 1.9.0 ← 1.8.0 diff Jul 20, 2025
updated 1.8.0 ← 1.7.1 diff Nov 30, 2024
updated 1.7.1 ← 1.7.0 diff Mar 20, 2024
updated 1.7.0 ← 1.6.2 diff May 13, 2022
updated 1.6.2 ← 1.6.1 diff Nov 7, 2021
updated 1.6.1 ← 1.6.0 diff Nov 7, 2021
updated 1.6.0 ← 1.5.0 diff Jul 21, 2021
updated 1.5.0 ← 1.4 diff Jun 18, 2021
updated 1.4 ← 1.3 diff Mar 20, 2021
updated 1.3 ← 1.2 diff Jun 29, 2020
updated 1.2 ← 1.1 diff Jun 28, 2020
updated 1.1 ← 1.0 diff Mar 31, 2020
updated 1.0 ← 0.1 diff Jan 26, 2020