Sort data for RLum-class and Risoe.BINfileData-class objects
Source:R/Luminescence-generics.R, R/RLum.Analysis-class.R, R/Risoe.BINfileData-class.R
sort_RLum.RdThe function provides a generalised access point for specific RLum and Risoe.BINfileData objects. Depending on the input object, the corresponding function will be selected.
Usage
sort_RLum(object, ...)
# S4 method for class 'list'
sort_RLum(object, ...)
# S4 method for class 'RLum.Analysis'
sort_RLum(object, slot = NULL, info_element = NULL, decreasing = FALSE, ...)
# S4 method for class 'Risoe.BINfileData'
sort_RLum(object, info_element, decreasing = FALSE, ...)Arguments
- object
RLum or Risoe.BINfileData (required): S4 object of class
RLum.AnalysisorRisoe.BINfileData.- ...
further arguments passed to the specific class method
- slot
character (optional): slot name to use in sorting.
- info_element
character (optional): names of the
infofield to use in sorting. The order of the names sets the sorting priority. Regardless of available info elements, the following elements always exist because they are calculated from the recordXY_LENGTH,NCOL,X_MIN,X_MAX,Y_MIN,Y_MAX.- decreasing
logical (with default): whether the sort order should be decreasing (
FALSEby default). It can be provided as a vector to control the ordering sequence for each sorting element.
Functions
sort_RLum(list): Returns a list of sorted RLum objects.sort_RLum(RLum.Analysis): Sorting ofRLum.Dataobjects contained in thisRLum.Analysisobject. At least one ofslotandinfo_elementmust be provided. If both are given, ordering byslotalways takes priority overinfo_element. Only the first element in eachslotand eachinfo_elementis used for sorting. Example:.pidcan contain multiple values, however, only the first is taken. Please note that theshow()method does some structuring, which may lead to the impression that the sorting did not work.sort_RLum(Risoe.BINfileData): Sort method for Risoe.BINfileData objects.
How to cite
Colombo, M., 2025. sort_RLum(): Sort data for RLum-class and Risoe.BINfileData-class objects. Function version 0.1.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., Steinbuch, L., Boer, A.d., 2025. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 1.1.1. https://r-lum.github.io/Luminescence/
Examples
## load example data
data(ExampleData.XSYG, envir = environment())
obj <- OSL.SARMeasurement$Sequence.Object[1:9]
sort_RLum(obj, slot = "recordType")
#>
#> [RLum.Analysis-class]
#> originator: read_XSYG2R()
#> protocol: SAR
#> additional info elements: 0
#> number of records: 9
#> .. : RLum.Data.Curve : 9
#> .. .. : #1 OSL (NA) <> #2 OSL (NA) <> #3 OSL (NA) <> #4 OSL (NA) <> #5 OSL (UVVIS)
#> .. .. : #6 TL (NA) <> #7 TL (NA) <> #8 TL (UVVIS)
#> .. .. : #9 irradiation (NA)
sort_RLum(obj, info_element = "curveDescripter")
#>
#> [RLum.Analysis-class]
#> originator: read_XSYG2R()
#> protocol: SAR
#> additional info elements: 0
#> number of records: 9
#> .. : RLum.Data.Curve : 9
#> .. .. : #1 TL (NA) <> #2 TL (NA)
#> .. .. : #3 OSL (NA) <> #4 OSL (NA)
#> .. .. : #5 TL (UVVIS)
#> .. .. : #6 OSL (UVVIS) <> #7 OSL (NA) <> #8 OSL (NA)
#> .. .. : #9 irradiation (NA)
data(ExampleData.XSYG, envir = environment())
sar <- OSL.SARMeasurement$Sequence.Object[1:5]
sort_RLum(sar, solt = "recordType", info_element = c("startDate"))
#>
#> [RLum.Analysis-class]
#> originator: read_XSYG2R()
#> protocol: SAR
#> additional info elements: 0
#> number of records: 5
#> .. : RLum.Data.Curve : 5
#> .. .. : #1 TL (UVVIS) <> #2 TL (NA) <> #3 TL (NA)
#> .. .. : #4 OSL (UVVIS) <> #5 OSL (NA)