Converts Luminescence::RLum objects to xlum format

convert_rlum2xlum(rlum, file = NULL)

Arguments

rlum

Luminescence::RLum.Data and Luminescence::RLum.Analysis or a list of it (required): input for the conversion

file

character (optional): file name for the export, if NULL (the default), an xml2::xml_document object is returned

Value

Depending on the setting. If file == NULL an xml2::xml_document object is returned, if file is set the function attempts to write an *.xlum file`.

Details

The function tries to make a best possible conversion of the Luminescence::RLum to the xlum format. Luminescence::RLum.Results objects are not supported.

Because of the nature the Luminescence::RLum structure, the nodes <xlum/>, <sample/> are set automatically because the Luminescence::RLum does not distinguish between different samples.

Function version

0.1.0

Author

Sebastian Kreutzer, Institute of Geography, Heidelberg University, Heidelberg (Germany)

How to cite

Kreutzer, S., 2022. convert_rlum2xlum(): Convert RLum-class objects to the XLUM format. Function version 0.1.0. In: Kreutzer, S., 2022. xlum: Read, Write, and Convert XLUM Data. R package version 0.1.0.

Examples

data(ExampleData.RLum.Analysis,
envir = environment(),
package = "Luminescence")
convert_rlum2xlum(IRSAR.RF.Data)
#> {xml_document}
#> <xlum lang="en" formatVersion="1.0" flavour="string" author="string" license="CC BY 4.0" doi="" xmlns:xlum="http://xlum.r-luminescence.org">
#> [1] <sample name="NA" mineral="NA" latitude="52.416944" longitude="4.066389"  ...