Generic functions for manipulation of metadata in Risoe.BINfileData, RLum.Analysis and RLum.Data objects.
Usage
add_metadata(object, ...) <- value
rename_metadata(object, ...) <- value
replace_metadata(object, ...) <- value
How to cite
Colombo, M., 2025. add_metadata<-(): Safe manipulation of object metadata. 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/
Examples
## load example data
data(ExampleData.BINfileData, envir = environment())
## show data
CWOSL.SAR.Data
#>
#> [Risoe.BINfileData object]
#>
#> BIN/BINX version: 03
#> Object date: 060920, 070920, 080920, 090920, 100920
#> User: Default
#> System ID: 0 (unknown)
#> Overall records: 720
#> Records type: IRSL (n = 24)
#> OSL (n = 336)
#> TL (n = 360)
#> Position range: 1 : 24
#> Run range: 1 : 8
## add a new field
add_metadata(CWOSL.SAR.Data,
info_element = "INSTITUTE") <- "Heidelberg University"
## rename a field
rename_metadata(CWOSL.SAR.Data,
info_element = "INSTITUTE") <- "INSTITUTION"
## replace all LTYPE to RSL
## but only for the first position
replace_metadata(
object = CWOSL.SAR.Data,
info_element = "LTYPE",
subset = (POSITION == 1)) <- "RSL"
## replacing a field with NULL allows to remove that field
replace_metadata(CWOSL.SAR.Data,
info_element = "PREVIOUS") <- NULL
## show the modified data
CWOSL.SAR.Data
#>
#> [Risoe.BINfileData object]
#>
#> BIN/BINX version: 03
#> Object date: 060920, 070920, 080920, 090920, 100920
#> User: Default
#> System ID: 0 (unknown)
#> Overall records: 720
#> Records type: IRSL (n = 23)
#> OSL (n = 322)
#> RSL (n = 30)
#> TL (n = 345)
#> Position range: 1 : 24
#> Run range: 1 : 8