% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_BINXLOG2R.R
\name{read_BINXLOG2R}
\alias{read_BINXLOG2R}
\title{Import Risø BINX-data from the BINX Log File}
\usage{
read_BINXLOG2R(file, verbose = TRUE, ...)
}
\arguments{
\item{file}{\link{character} (\strong{required}):
name of one or multiple ASCII log files to read; it can be a path to a
directory, in which case the function tries to read all files it finds
(there is no file extension check, so it may fail ungracefully on binary
files).}

\item{verbose}{\link{logical} (\emph{with default}):
enable/disable output to the terminal.}

\item{...}{further arguments that will be passed to the function (currently not used)}
}
\value{
Returns an S4 \linkS4class{RLum.Analysis} object. Results are
returned as a list when multiple files are processed or \code{file} is a list.
}
\description{
The function attempts to extract meaningful measurement data from the
log file (\code{.txt}) stored along with a BINX file if this option was chosen.
This is particularly helpful if the BINX file is broken and the data would
be lost otherwise.
}
\details{
This function is basically a hack trying to make the most out of a broken file in case
at least the log file is salvageable. Please do not expect black magic; the extract is
very basic, and the function was written to work for TL, OSL, IRSL curves only.
If it breaks, it breaks.

\strong{TL curve extraction}
Since the BIN/BINX do not contain x-values, they also cannot be created magically
here. To avoid problems with the conversion, we assume always BIN-file version \code{3} for
the conversion. This should be okay in most cases, however, it may become problematic
if you have data for dedicated curve analysis.
}
\note{
This function tries to extract data from a log file produced for debugging
purposes. There is no guarantee regarding the format stability, and the
function is meant as a last resort if your BIN/BINX files are unusable.
}
\section{Function version}{
 0.1.1
}

\examples{
## read log file (RLum.Analysis)
file <-  system.file("extdata/BINX_IRSL_LOG.TXT", package = "Luminescence")
object <-  read_BINXLOG2R(file = file)

## convert to RisoeBINFile-class object
object <- convert_RLum2Risoe.BINfileData(object)

## export as BINX
\dontrun{
 write_R2BIN(t, file = tempfile(), version = "04")
}

}
\seealso{
\link{read_BIN2R}, \link{write_R2BIN}, \linkS4class{Risoe.BINfileData},
\link[base:readLines]{base::readLines}, \linkS4class{RLum.Analysis}, \link{list.files}
}
\author{
Sebastian Kreutzer, F2.1 Geophysical Parametrisation/Regionalisation, LIAG - Institute for Applied Geophysics (Germany)
, RLum Developer Team} 

\section{How to cite}{
Kreutzer, S., 2026. read_BINXLOG2R(): Import Risø BINX-data from the BINX Log File. Function version 0.1.1. In: Kreutzer, S., Burow, C., Dietze, M., Fuchs, M.C., Schmidt, C., Fischer, M., Friedrich, J., Mercier, N., Philippe, A., Riedesel, S., Autzen, M., Mittelstrass, D., Gray, H.J., Galharret, J., Colombo, M., Steinbuch, L., Boer, A.d., Bluszcz, A., 2026. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 1.2.1. https://r-lum.github.io/Luminescence/
}

\keyword{IO}
