version: character (optional): version number for the output file. If no value is provided, the highest version number from the Risoe.BINfileData is taken automatically.
Note:
This argument can be used to convert BIN-file versions.
compatibility.mode: logical (with default): this option recalculates the position values if necessary and set the max. value to 48. The old position number is appended as comment (e.g., 'OP: 70). This option accounts for potential compatibility problems with the Analyst software. It further limits the maximum number of points per curve to 9,999. If a curve contains more data the curve data get binned using the smallest possible bin width.
verbose: logical (with default): enable/disable output to the terminal.
txtProgressBar: logical (with default): enable/disable the progress bar. Ignored if verbose = FALSE.
Returns
Write a binary file and returns the name and path of the file as character .
Details
The structure of the exported binary data follows the data structure published in the Appendices of the Analyst manual p. 42.
If LTYPE, DTYPE and LIGHTSOURCE are not of type character , no transformation into numeric values is done.
Note
The function just roughly checks the data structures. The validity of the output data depends on the user.
The validity of the file path is not further checked. BIN-file conversions using the argument version may be a lossy conversion, depending on the chosen input and output data (e.g., conversion from version 08 to 07 to 06 to 05 to 04 or 03).
Warning
Although the coding was done carefully, it seems that the BIN/BINX-files produced by Risø DA 15/20 TL/OSL readers slightly differ on the byte level. No obvious differences are observed in the METADATA, however, the BIN/BINX-file may not fully compatible, at least not similar to the ones directly produced by the Risø readers!
ROI definitions (introduced in BIN-file version 8) are not supported! There are furthermore ignored by the function read_BIN2R .
Function version
0.5.4
Examples
##load example datasetfile <- system.file("extdata/BINfile_V8.binx", package ="Luminescence")temp <- read_BIN2R(file)##create temporary file path##(for usage replace by own path)temp_file <- tempfile(pattern ="output", fileext =".binx")##export to temporary file pathwrite_R2BIN(temp, file = temp_file)
How to cite
Kreutzer, S., 2025. write_R2BIN(): Export Risoe.BINfileData into Risø BIN/BINX-file. Function version 0.5.4. 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., 2025. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 1.0.1. https://r-lum.github.io/Luminescence/