% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/load-spectra.R
\name{readOPUS}
\alias{readOPUS}
\title{Read OPUS binary and ASCII files}
\usage{
readOPUS(fnames, in_format, out_format)
}
\arguments{
\item{fnames}{character \code{vector} of the name(s)
(with absolute path) of the file(s) to read}

\item{in_format}{format of the input file: \code{'binary'} or
\code{'txt'}}

\item{out_format}{format of the output:
\code{'matrix'} (default) or \code{'list'} (see below)}
}
\value{
if \code{out_format} = \code{'matrix'}, absorbance values
of the input file(s) in a single \code{matrix}.

if \code{out_format} = \code{'list'}, a \code{list} of the
input file(s) data consisting of a \code{list} with components:
\itemize{
 \item{\code{Name}}{ name of the file imported}
 \item{\code{datetime}}{ date and time of acquisition in
 \code{POSIXct} format (available only when
 \code{in_format} = 'binary')}
 \item{\code{metadata}}{ \code{list} with information
 on instrument configuration (available only when
 \code{in_format} = 'binary')}
 \item{\code{absorbance}}{  a numeric \code{vector}
 of absorbance values}
 \item{\code{wavenumbers}}{ numeric \code{vector}
of the band positions}
}
}
\description{
Read single or multiple binary and ASCII files acquired with
an Bruker Vertex FTIR Instrument
}
\note{
This is essentially a re-factored and simplified version of
the \code{read.opus} function from the
\sQuote{soil.spec} package for reading OPUS VERTEX files
The function should also work for other OPUS files (eg alpha),
see \code{read.opus}.
}
\author{
Antoine Stevens and Andrew Sila (soil.spec package)
}

