| read_BIN2R | R Documentation |
Import a *.bin or a *.binx file produced by a Risø DA15 and DA20 TL/OSL
reader into R.
read_BIN2R(
file,
show.raw.values = FALSE,
position = NULL,
n.records = NULL,
zero_data.rm = TRUE,
duplicated.rm = FALSE,
fastForward = FALSE,
show.record.number = FALSE,
txtProgressBar = TRUE,
forced.VersionNumber = NULL,
ignore.RECTYPE = FALSE,
pattern = NULL,
verbose = TRUE,
...
)
file |
character or list (required): name of one or multiple BIN/BINX files (URLs are supported); it can be the path to a directory, in which case the function tries to detect and import all BIN/BINX files found recursively from the given directory. |
show.raw.values |
logical (with default):
shows raw values from BIN-file for |
position |
numeric (optional):
imports only the selected position. Note: the import performance will not
benefit by any selection made here.
Can be provided as |
n.records |
numeric (optional): limits the number of imported records
to the provided record id (e.g., |
zero_data.rm |
logical (with default):
remove erroneous data with no count values. As such data are usually not
needed for the subsequent data analysis they will be removed by default.
Can be provided as |
duplicated.rm |
logical (with default):
remove duplicated entries if |
fastForward |
logical (with default):
if |
show.record.number |
logical (with default):
shows record number of the imported record, for debugging usage only.
Can be provided as |
txtProgressBar |
logical (with default):
enable/disable the progress bar. Ignored if |
forced.VersionNumber |
integer (optional):
allows to cheat the version number check in the function by own values for
cases where the BIN-file version is not supported.
Can be provided as Note: The usage is at own risk, only supported BIN-file versions have been tested. |
ignore.RECTYPE |
logical or numeric (with default):
this argument allows to ignore values in the byte 'RECTYPE' (BIN-file version 08),
in case there are not documented or faulty set. In this case the corrupted records are skipped.
If the setting is numeric (e.g., |
pattern |
character (optional):
regular expression pattern passed to list.files to construct a list of
files to read (used only when |
verbose |
logical (with default): enable/disable output to the terminal. |
... |
further arguments that will be passed to the function
Risoe.BINfileData2RLum.Analysis. Please note that any matching argument
automatically sets |
The binary data file is parsed byte by byte following the data structure published in the Appendices of the Analyst manual p. 42.
For the general BIN/BINX-file structure, the reader is referred to the Risø website: https://www.fysik.dtu.dk
Returns an S4 Risoe.BINfileData object containing two slots:
METADATA |
A data.frame containing all variables stored in the BIN-file. |
DATA |
A list containing a numeric vector of the measured data. The ID corresponds to the record ID in METADATA. |
If fastForward = TRUE an RLum.Analysis object is
returned (coerced by Risoe.BINfileData2RLum.Analysis).
Results are returned as a list when multiple files are processed or file
is a list.
0.19
Kreutzer, S., Fuchs, M.C., Colombo, M., 2026. read_BIN2R(): Import Risø BIN/BINX-files into R. Function version 0.19. 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., de Boer, A., Bluszcz, A., 2026. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 1.3.1. https://r-lum.github.io/Luminescence/
The function works for BIN/BINX-format versions 03, 04, 05, 06, 07 and 08. The version number depends on the used Sequence Editor.
Sebastian Kreutzer, F2.1 Geophysical Parametrisation/Regionalisation, LIAG - Institute for Applied Geophysics (Germany)
Margret C. Fuchs, HZDR Freiberg, (Germany)
Marco Colombo, Institute of Geography, Heidelberg University (Germany)
based on information provided by Torben Lapp and Karsten Bracht Nielsen (Risø DTU, Denmark)
, RLum Developer Team
DTU Nutech, 2016. The Sequence Editor, Users Manual, February, 2016. https://www.fysik.dtu.dk
write_R2BIN, Risoe.BINfileData, base::readBin, merge_Risoe.BINfileData, RLum.Analysis utils::txtProgressBar, list.files
file <- system.file("extdata/BINfile_V8.binx", package = "Luminescence")
temp <- read_BIN2R(file)
temp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.