RLum.Analysis-class {Luminescence} | R Documentation |
Class "RLum.Analysis"
Description
Object class to represent analysis data for protocol analysis, i.e. all curves, spectra etc. from one measurements. Objects from this class are produced, by e.g. read_XSYG2R, read_Daybreak2R
Usage
## S4 method for signature 'RLum.Analysis'
show(object)
## S4 method for signature 'RLum.Analysis'
set_RLum(
class,
originator,
.uid,
.pid,
protocol = NA_character_,
records = list(),
info = list()
)
## S4 method for signature 'RLum.Analysis'
get_RLum(
object,
record.id = NULL,
recordType = NULL,
curveType = NULL,
RLum.type = NULL,
protocol = "UNKNOWN",
get.index = NULL,
drop = TRUE,
recursive = TRUE,
info.object = NULL,
subset = NULL,
env = parent.frame(2)
)
## S4 method for signature 'RLum.Analysis'
remove_RLum(object, ...)
## S4 method for signature 'RLum.Analysis'
structure_RLum(object, fullExtent = FALSE)
## S4 method for signature 'RLum.Analysis'
length_RLum(object)
## S4 method for signature 'RLum.Analysis'
names_RLum(object)
## S4 replacement method for signature 'RLum.Analysis'
add_metadata(object, info_element) <- value
## S4 replacement method for signature 'RLum.Analysis'
rename_metadata(object, info_element) <- value
## S4 replacement method for signature 'RLum.Analysis'
replace_metadata(object, info_element, subset = NULL) <- value
## S4 method for signature 'RLum.Analysis'
smooth_RLum(object, ...)
## S4 method for signature 'RLum.Analysis'
sort_RLum(object, slot = NULL, info_element = NULL, decreasing = FALSE, ...)
## S4 method for signature 'RLum.Analysis'
melt_RLum(object)
## S4 method for signature 'RLum.Analysis'
view(object, ...)
Arguments
object |
RLum.Analysis (required): object with records to be removed |
class |
|
originator |
|
.uid |
|
.pid |
|
protocol |
|
records |
|
info |
Returns an RLum.Analysis object. |
record.id |
|
recordType |
|
curveType |
|
RLum.type |
|
get.index |
|
drop |
|
recursive |
|
info.object |
|
subset |
|
env |
|
... |
other arguments that might be passed |
fullExtent |
structure_RLum; logical (with default):
extends the returned |
info_element |
character (optional): names of the |
value |
(required) The value assigned to the selected elements
of the metadata field. If |
slot |
character (optional): slot name to use in sorting. |
decreasing |
logical (with default): whether the sort order should
be decreasing ( |
Value
get_RLum
:
Returns:
Single RLum.Data object, if only one object is contained and
recursive = FALSE
or-
RLum.Analysis objects for
drop = FALSE
RLum.Analysis; can be empty.
structure_RLum
:
Returns data.frame showing the structure.
length_RLum
Returns the number records in this object.
names_RLum
Returns the names of the record types (recordType
) in this object.
smooth_RLum
Same object as input, after smoothing
sort_RLum
Same object as input, but sorted according to the specified parameters.
melt_RLum
Flat data.frame with X
, Y
, TYPE
, UID
Methods (by generic)
-
show(RLum.Analysis)
: Show structure ofRLum.Analysis
object -
set_RLum(RLum.Analysis)
: Construction method for RLum.Analysis objects. -
get_RLum(RLum.Analysis)
: Accessor method for RLum.Analysis object.The slots record.id,
@recordType
,@curveType
and@RLum.type
are optional to allow for records limited by their id (list index number), their record type (e.g.recordType = "OSL"
) or object type.Example: curve type (e.g.
curveType = "predefined"
orcurveType ="measured"
)The selection of a specific RLum.type object superimposes the default selection. Currently supported objects are: RLum.Data.Curve and RLum.Data.Spectrum
-
remove_RLum(RLum.Analysis)
: Method to remove records from an RLum.Analysis object. -
structure_RLum(RLum.Analysis)
: Method to show the structure of an RLum.Analysis object. -
length_RLum(RLum.Analysis)
: Returns the length of the object, i.e., number of stored records. -
names_RLum(RLum.Analysis)
: Returns the names of the RLum.Data objects (same as shown with theshow
method) -
add_metadata(RLum.Analysis) <- value
: Adds metadata to RLum.Analysis objects -
rename_metadata(RLum.Analysis) <- value
: Renames a metadata entry of RLum.Analysis objects -
replace_metadata(RLum.Analysis) <- value
: Replaces or removes metadata of RLum.Analysis objects -
smooth_RLum(RLum.Analysis)
: Smoothing ofRLum.Data
objects contained in thisRLum.Analysis
object using the internal function.smoothing
. -
sort_RLum(RLum.Analysis)
: Sorting ofRLum.Data
objects contained in thisRLum.Analysis
object. At least one ofslot
andinfo_element
must be provided. If both are given, ordering byslot
always takes priority overinfo_element
. Only the first element in eachslot
and eachinfo_element
is used for sorting. Example:.pid
can contain multiple values, however, only the first is taken.Please note that the
show()
method does some structuring, which may lead to the impression that the sorting did not work. -
melt_RLum(RLum.Analysis)
: Melts RLum.Analysis objects into a flat data.frame to be used in combination with other packages such asggplot2
. -
view(RLum.Analysis)
: View method for RLum.Analysis objects
Slots
protocol
Object of class character describing the applied measurement protocol
records
Objects from the Class
Objects can be created by calls of the form set_RLum("RLum.Analysis", ...)
.
Class version
0.4.18
How to cite
Kreutzer, S., 2025. RLum.Analysis-class(): Class 'RLum.Analysis'. 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.0. https://r-lum.github.io/Luminescence/
Note
The method structure_RLum is currently just available for objects containing RLum.Data.Curve.
Author(s)
Sebastian Kreutzer, Institute of Geography, Heidelberg University (Germany) , RLum Developer Team
See Also
Risoe.BINfileData2RLum.Analysis, Risoe.BINfileData, RLum
Examples
## show method
showClass("RLum.Analysis")
##set an empty object
set_RLum(class = "RLum.Analysis")
## use example data
##load data
data(ExampleData.RLum.Analysis, envir = environment())
##show curves in object
get_RLum(IRSAR.RF.Data)
##show only the first object, but by keeping the object
get_RLum(IRSAR.RF.Data, record.id = 1, drop = FALSE)
## subsetting with SAR sample data
data(ExampleData.BINfileData, envir = environment())
sar <- object <- Risoe.BINfileData2RLum.Analysis(CWOSL.SAR.Data)
## get
get_RLum(sar, subset = "NPOINTS == 250")
## remove
remove_RLum(sar, subset = "NPOINTS == 250")
## **sort_RLum()** ##
data(ExampleData.XSYG, envir = environment())
sar <- OSL.SARMeasurement$Sequence.Object[1:5]
sort_RLum(sar, solt = "recordType", info_element = c("startDate"))