Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New function: sort_RLum() #528

Open
RLumSK opened this issue Dec 10, 2024 · 0 comments
Open

New function: sort_RLum() #528

RLumSK opened this issue Dec 10, 2024 · 0 comments

Comments

@RLumSK
Copy link
Member

RLumSK commented Dec 10, 2024

To complete the functional, we should also add a function sort_RLum().

For what?

  • methods for RLum.Analysis-class and Risoe.BINfileData-class objects only
  • generic for sort_RLum()
  • Should work on a list of RLum.Analysis-class object
  • Option fort ascending and descending

How should it work?

  • It should work on all slots and class elements the RLum.Data-class objects in a RLum.Analysis() object, means sorting can be done by either using slot entries or @info element entries.
  • Slot and @info element sorting can be combined. Slot ordering always supersedes @info ordering.
  • Default value is ascending()
  • The sorting on Risoe.BINfileData-class is a simple table sorting that maintains the class.

Output

Short return the same output as input, but sorted.

Pseudo example

object
 [RLum.Analysis-class]
	 originator: Risoe.BINfileData2RLum.Analysis()
	 protocol: unknown
	 additional info elements:  0
	 number of records: 7
	 .. : RLum.Data.Curve : 7
	 .. .. : #1 TL | #2 OSL | #3 TL | #4 OSL | #5 TL | #6 OSL | #7 TL

object_sorted <- sort_RLum(object, slot = "records", info_element = NULL, slot_sort = "ascending", info_element_sort = "ascending")
object_sorted 
 [RLum.Analysis-class]
	 originator: Risoe.BINfileData2RLum.Analysis()
	 protocol: unknown
	 additional info elements:  0
	 number of records: 7
	 .. : RLum.Data.Curve : 7
	 .. .. : #1 OSL | #2 OSL | #3 OSL | #4 OSL | #5 TL | #6 TL | #7 TL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants