Learn R Programming

ir (version 0.2.0)

ir_import_spc: Imports infrared spectra from Thermo Galactic's files

Description

ir_import_spc imports raw infrared spectra from a Thermo Galactic's .spc file or several of such files. ir_import_spc is a wrapper function to hyperSpec::read.spc().

Usage

ir_import_spc(filenames)

Arguments

filenames

A character vector representing the complete paths to the .spc files to import.

Value

An object of class ir containing the infrared spectra extracted from the .spc file(s) and the metadata as extracted by hyperSpec::read.spc(). Metadata variables are:

scan_number

An integer value representing the number of scans.

detection_gain_factor

The detection gain factor.

scan_speed

The scan speed [kHz].

laser_wavenumber

The wavenumber of the laser.

detector_name

The name of the detector.

source_name

The name of the infrared radiation source.

purge_delay

The duration of purge delay before a measurement [s].

zero_filling_factor

A numeric value representing the zero filling factor.

apodisation_function

The name of the apodisation function.

exponentiation factor

The exponentiation factor used for file compression.

data_point_number

The number of data points in the spectrum

x_variable_type

The type of the x variable.

y_variable_type

The type of the y variable.

measurement_date

A POSIXct representing the measurement date and time.

measurement_device

The name of the measurement device.

Examples

Run this code
# NOT RUN {
# import a sample .spc file
x <- ir::ir_import_spc(system.file("extdata/1.spc", package = "ir"))

# }

Run the code above in your browser using DataLab