Function calls object-specific set functions for RLum S4 class objects.
Arguments
- class
RLum (required): name of the S4 class to create
- originator
character (automatic): contains the name of the calling function (the function that produces this object); can be set manually.
- .uid
character (automatic): sets an unique ID for this object using the internal C++ function
create_UID
.- .pid
character (with default): option to provide a parent id for nesting at will.
- ...
further arguments that one might want to pass to the specific set method
Details
The function provides a generalised access point for specific
RLum objects.
Depending on the given class, the corresponding method to create an object
from this class will be selected. Allowed additional arguments can be found
in the documentations of the corresponding RLum class:
Author
Sebastian Kreutzer, Institute of Geography, Heidelberg University (Germany) , RLum Developer Team
How to cite
Kreutzer, S., 2024. set_RLum(): General set function for RLum S4 class objects. Function version 0.3.0. 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., 2024. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 0.9.26. https://r-lum.github.io/Luminescence/
Examples
##produce empty objects from each class
set_RLum(class = "RLum.Data.Curve")
#>
#> [RLum.Data.Curve-class]
#> recordType: NA
#> curveType: NA
#> measured values: 1
#> .. range of x-values: 0 0
#> .. range of y-values: 0 0
#> additional info elements: 0
set_RLum(class = "RLum.Data.Spectrum")
#>
#> [RLum.Data.Spectrum-class]
#> recordType: Spectrum
#> curveType: NA
#> .. recorded frames: 1
#> .. .. measured values per frame: 1
#> .. .. range wavelength/pixel: Inf -Inf
#> .. .. range time/temp.: Inf -Inf
#> .. .. range count values: NA NA
#> additional info elements: 0
set_RLum(class = "RLum.Data.Spectrum")
#>
#> [RLum.Data.Spectrum-class]
#> recordType: Spectrum
#> curveType: NA
#> .. recorded frames: 1
#> .. .. measured values per frame: 1
#> .. .. range wavelength/pixel: Inf -Inf
#> .. .. range time/temp.: Inf -Inf
#> .. .. range count values: NA NA
#> additional info elements: 0
set_RLum(class = "RLum.Analysis")
#>
#> [RLum.Analysis-class]
#> originator: eval()
#> protocol: NA
#> additional info elements: 0
#> number of records: 0
#> >> This is an empty object, which cannot be used for further analysis! <<
set_RLum(class = "RLum.Results")
#>
#> [RLum.Results-class]
#> originator: eval()
#> data: 0
#> .. $ : list
#> additional info elements: 0
##produce a curve object with arbitrary curve values
object <- set_RLum(
class = "RLum.Data.Curve",
curveType = "arbitrary",
recordType = "OSL",
data = matrix(c(1:100,exp(-c(1:100))),ncol = 2))
##plot this curve object
plot_RLum(object)