read.drift: Read DRIFT-spectroscopy data

Description Usage Arguments Details Value See Also Examples

View source: R/drift_read.R

Description

Read DRIFTS spectrum from Spectrotest text file or connection produced by FT-CONTROL software for FTIR-spectrometers.

Usage

1

Arguments

con

a connection object or a character string naming the file to read.

Details

Argument con has the same meaning as in readLines.

Value

An object of S3-class drift.

See Also

Other drift: as.data.frame.drift(), cbind.drift(), channel(), coal_drift(), diff.drift(), median.drift(), plot.drift(), slice(), write.drift()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 s0 <- coal_drift()

 # Write to text file:
 write.drift(s0, "s0.ir")

 # Read from text file:
 s1 <- read.drift("s0.ir")

 unlink("s0.ir")

 # Light unit test:
 stopifnot(all(s0 == s1))

omega1x/spectrotest documentation built on Oct. 1, 2020, 4 p.m.