% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Risoe.BINfileData2RLum.Analysis.R
\name{Risoe.BINfileData2RLum.Analysis}
\alias{Risoe.BINfileData2RLum.Analysis}
\title{Convert Risoe.BINfileData object to an RLum.Analysis object}
\usage{
Risoe.BINfileData2RLum.Analysis(
  object,
  pos = NULL,
  grain = NULL,
  run = NULL,
  set = NULL,
  ltype = NULL,
  dtype = NULL,
  protocol = "unknown",
  keep.empty = TRUE,
  txtProgressBar = FALSE
)
}
\arguments{
\item{object}{\linkS4class{Risoe.BINfileData} (\strong{required}):
\code{Risoe.BINfileData} object}

\item{pos}{\link{numeric} (\emph{optional}): position number of the \code{Risoe.BINfileData}
object for which the curves are stored in the \code{RLum.Analysis} object.
If \code{length(position)>1} a list of \code{RLum.Analysis} objects is returned.
If nothing is provided every position will be converted.
If the position is not valid \code{NA} is returned.}

\item{grain}{\link{vector}, \link{numeric} (\emph{optional}):
grain number from the measurement to limit the converted data set
(e.g., \code{grain = c(1:48)}). Please be aware that this option may lead to
unwanted effects, as the output is strictly limited to the choosen grain
number for all position numbers}

\item{run}{\link{vector}, \link{numeric} (\emph{optional}):
run number from the measurement to limit the converted data set
(e.g., \code{run = c(1:48)}).}

\item{set}{\link{vector}, \link{numeric} (\emph{optional}):
set number from the measurement to limit the converted data set
(e.g., \code{set = c(1:48)}).}

\item{ltype}{\link{vector}, \link{character} (\emph{optional}):
curve type to limit the converted data. Commonly allowed values are:
\code{IRSL}, \code{OSL}, \code{TL}, \code{RIR}, \code{RBR} and \code{USER}
(see also \linkS4class{Risoe.BINfileData})}

\item{dtype}{\link{vector}, \link{character} (\emph{optional}):
data type to limit the converted data. Commonly allowed values are
listed in \linkS4class{Risoe.BINfileData}}

\item{protocol}{\link{character} (\emph{optional}):
sets protocol type for analysis object. Value may be used by subsequent
analysis functions.}

\item{keep.empty}{\link{logical} (\emph{with default}):
If \code{TRUE} (default) an \code{RLum.Analysis} object is returned even if it does
not contain any records. Set to \code{FALSE} to discard all empty objects.}

\item{txtProgressBar}{\link{logical} (\emph{with default}):
enables or disables \link{txtProgressBar}.}
}
\value{
Returns an \linkS4class{RLum.Analysis} object.
}
\description{
Converts values from one specific position of a Risoe.BINfileData S4-class
object to an RLum.Analysis object.
}
\details{
The \linkS4class{RLum.Analysis} object requires a set of curves for
specific further protocol analyses. However, the \linkS4class{Risoe.BINfileData}
usually contains a set of curves for different aliquots and different
protocol types that may be mixed up. Therefore, a conversion is needed.
}
\note{
The \code{protocol} argument of the \linkS4class{RLum.Analysis}
object is set to 'unknown' if not stated otherwise.
}
\section{Function version}{
 0.4.2
}

\examples{

##load data
data(ExampleData.BINfileData, envir = environment())

##convert values for position 1
Risoe.BINfileData2RLum.Analysis(CWOSL.SAR.Data, pos = 1)

}
\seealso{
\linkS4class{Risoe.BINfileData}, \linkS4class{RLum.Analysis}, \link{read_BIN2R}
}
\author{
Sebastian Kreutzer, Geography & Earth Sciences, Aberystwyth University (United Kingdom)
, RLum Developer Team} 

\section{How to cite}{
Kreutzer, S., 2020. Risoe.BINfileData2RLum.Analysis(): Convert Risoe.BINfileData object to an RLum.Analysis object. Function version 0.4.2. In: Kreutzer, S., Burow, C., Dietze, M., Fuchs, M.C., Schmidt, C., Fischer, M., Friedrich, J., Riedesel, S., Autzen, M., 2020. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 0.9.8. https://r-luminescence.org
}

\keyword{manip}
