spc
file formatR/DEPRECATED-read.spc.R
DEPRECATED-read.spc.Rd
These data input functions are deprecated and they will be removed in the next release of hyperspcc package. Now functions in package hySpc.read.spc (link) should be used as the alternatives.
Old description:
These functions allow to import Thermo Galactic/Grams .spc
files.
read.spc( filename, keys.hdr2data = FALSE, keys.log2data = FALSE, log.txt = TRUE, log.bin = FALSE, log.disk = FALSE, hdr = list(), no.object = FALSE )
filename | The complete file name of the |
---|---|
keys.hdr2data, keys.log2data | character vectors with the names of parameters in the All header fields specified in the |
log.txt | Should the text part of the |
log.bin, log.disk | Should the normal and on-disk binary parts of the
|
hdr | A list with fileheader fields that overwrite the settings of actual file's header. Use with care, and look into the source code for detailed insight on the elements of this list. |
no.object | If This parameter will likely be subject to change in future - use with care. |
If the file contains multiple spectra with individual wavelength
axes, read.spc
returns a list of hyperSpec objects. Otherwise the
result is a hyperSpec object.
read.spc.KaiserMap
returns a hyperSpec object with data columns x,
y, and z containing the stage position as recorded in the .spc
files'
log.
Only a restricted set of test files was available for development. Particularly, the w-planes feature could not be tested.
If you have .spc
files that cannot be read with these function, don't
hesitate to contact the package maintainer with your code patch or asking
advice.
Source development kit and file format specification of .spc
files.
C. Beleites
## get the sample .spc files from ftirsearch.com (see above) if (FALSE) { # single spectrum spc <- read.spc("BENZENE.SPC") plot(spc) # multi-spectra .spc file with common wavelength axis spc <- read.spc("IG_MULTI.SPC") spc # multi-spectra .spc file with individual wavelength axes spc <- read.spc("BARBITUATES.SPC") plot(spc[[1]], lines.args = list(type = "h")) }