photobiologyInOut

Package 'photobiologyInOut' provides functions for importing spectral data from diverse sources including instrument-specific files, as well as spectral data output by solar-radiation simulation models. It also includes functions for exchanging spectral data with other R packages. Package 'photobiologyInOut' complements other packages in the 'r4photobiology suite' by allowing reading and writing foreign spectral data as well as reading data saved from data loggers.

Developing a package like this is a never-ending task as I have only a limited sample of output files for testing and formats are quite variable. The functions may not work with different software or firmware versions used for acquiring spectral data from instruments. Even the format of files can depend on the current locale and operating system.

Please, see the r4photobiology web site for details on the suite.

Warning

The functions in this package work with the example files I have access to for testing, but they may not work with your own files as file formats vary.

PLEASE, BE VERY CAREFUL WHEN USING THIS PACKAGE. DO CHECK THAT UNITS USED IN THE IMPORTED FILE ARE THOSE EXPECTED BY THESE FUNCTIONS AND THAT THE VALUES ARE AS EXPECTED!

If they do not work with your files, they hopefully will be useful as examples for developing your own functions. If you develop new functions or improve the existing ones, please, do contribute them back to this project.

Help topics

Package overview

Import data files from spectrometers

We provide functions for importing data from some common brands and types of instruments.

  • read_avaspec_csv(read_avaspec_xls)
    Read '.csv' File Saved by Avantes' Software for AvaSpec.
  • read_licor_prn(read_m_licor_prn)
    Read '.PRN' File(s) Saved by LI-COR's PC1800 Program.
  • read_macam_dta
    Read '.DTA' File Saved by Macam's Software.
  • read_oo_jazirrad(read_oo_jazdata)
    Read Absolute Irradiance File Saved by Ocean Optics' Jaz spectrometer.
  • read_oo_pidata
    Read File Saved by Ocean Optics' Raspberry Pi software.
  • read_oo_ssirrad(read_oo_ssdata)
    Read File Saved by Ocean Optics' SpectraSuite.

Import data files from dataloggers

We provide functions for importing data from some common brands and types of instruments.

  • read_csi_dat
    Read '.DAT' file(s) saved by modern Campbell Scientific loggers.

Import data from simulation models

We provide functions for importing spectral data from models we use. As the file format may vary depending on settings, these are mainly provided as examples.

Import data from repositories

We provide functions for importing spectral data from files downloaded from repositories of spectral data.

Exchange data with base R and other R packages

  • mat2mspct
    Convert a matrix into a collection of spectra
  • mspct2mat
    Convert a collection of spectra into a matrix
  • colorSpec2mspct(colorSpec2spct, colorSpec2chroma_spct, mspct2colorSpec, spct2colorSpec, chroma_spct2colorSpec)
    Convert 'colorSpec::colorSpec' objects
  • hyperSpec2mspct(hyperSpec2spct, mspct2hyperSpec, spct2hyperSpec)
    Convert 'hyperSpec::hyperSpec' objects
  • rspec2mspct(rspec2spct)
    Convert "pavo::rspec" objects

Vignettes

Dependencies

  • Imports: lubridate, tibble, dplyr, readr, readxl, photobiology, reshape2, hyperSpec, colorSpec, pavo, lazyeval, methods
  • Suggests: knitr, ggspectra, photobiologyWavebands, ggplot2, ggmap, testthat

Authors