The function provides a generalised access point for specific RLum objects. Depending on the input object, the corresponding function will be selected.
get_RLum(object, ...)# S4 method for list
get_RLum(object, class = NULL, null.rm = FALSE, ...)
# S4 method for NULL
get_RLum(object, ...)
# S4 method for RLum.Analysis
get_RLum(
object,
record.id = NULL,
recordType = NULL,
curveType = NULL,
RLum.type = NULL,
protocol = "UNKNOWN",
get.index = FALSE,
drop = TRUE,
recursive = TRUE,
info.object = NULL,
subset = NULL,
env = parent.frame(2)
)
# S4 method for RLum.Data.Curve
get_RLum(object, info.object = NULL)
# S4 method for RLum.Data.Image
get_RLum(object, info.object = NULL)
# S4 method for RLum.Data.Spectrum
get_RLum(object, info.object = NULL)
# S4 method for RLum.Results
get_RLum(object, data.object, info.object = NULL, drop = TRUE)
An object of the same type as the input object provided.
RLum (required):
S4 object of class RLum or an object of type list containing only objects
of type RLum
further arguments passed to the specific class method.
character (optional): define which class gets selected if applied to a list, e.g., if a list consists of different type of RLum objects, this arguments allows to make a selection. If nothing is provided, all RLum objects are treated.
logical (with default):
whether empty and NULL objects should be removed.
numeric or logical (optional):
IDs of specific records. If of type logical the entire id range is assumed
and TRUE and FALSE indicates the selection.
character (optional):
record type (e.g., "OSL"). Can be also a vector, for multiple matching,
e.g., recordType = c("OSL", "IRSL")
character (optional): curve type (e.g. "predefined" or "measured")
character (optional): RLum object type. Defaults to "RLum.Data.Curve" and "RLum.Data.Spectrum".
character (optional): currently ignored.
logical (optional):
return a numeric vector with the index of each element in the RLum.Analysis
object (FALSE by default).
logical (with default):
coerce to the next possible layer (which are RLum.Data objects if
object is an RLum.Analysis object). If drop = FALSE, an object
of the same type as the input is returned.
logical (with default):
if TRUE (default) when the result of the get_RLum() request is a single
object, the object itself will be returned directly, rather than being
wrapped in a list. Mostly this makes things easier, but this might be
undesired if this method is used within a loop.
character (optional): name of the wanted info element.
expression (optional):
logical or character masking a logical expression indicating elements or rows to keep:
missing values are taken as false. This argument takes precedence over all other arguments,
meaning they are not considered when subsetting the object. subset works slots and
info elements.
environment (with default): An environment passed to eval as the enclosure. This argument is only relevant when subsetting the object and should not be used manually.
character or numeric: name or index of the data slot to be returned.
get_RLum(list): Returns a list of RLum objects that had been passed to get_RLum
get_RLum(`NULL`): Returns NULL.
get_RLum(RLum.Analysis): Accessor method for RLum.Analysis objects.
The optional arguments record.id, recordType, curveType and RLum.type
allow to limit records by their id (list index number), their record type
(e.g. recordType = "OSL"), their curve type (e.g. curveType = "predefined"
or curveType ="measured"), or object type.
The selection of a specific RLum.type object superimposes the default selection. Currently supported objects are: RLum.Data.Curve and RLum.Data.Spectrum
Returns:
list of RLum.Data objects or
Single RLum.Data object, if only one object is contained and recursive = FALSE or
RLum.Analysis objects for drop = FALSE
get_RLum(RLum.Data.Curve): Accessor method for RLum.Data.Curve object.
The argument info.object is optional to directly access the info elements.
If no info element name is provided, the raw curve data (matrix) will be
returned.
get_RLum(RLum.Data.Image): Accessor method for RLum.Data.Image objects.
The argument info.object is optional to directly access the info elements.
If no info element name is provided, the raw image data (array) will be
returned.
get_RLum(RLum.Data.Spectrum): Accessor method for RLum.Data.Spectrum objects.
The argument info.object is optional to directly access the info elements.
If no info element name is provided, the raw curve data (matrix) will be
returned.
get_RLum(RLum.Results): Accessor method for RLum.Results object.
The argument data.object allows to access directly objects stored
within the slot data. The default return object depends on the object
originator (e.g., fit_LMCurve). If nothing is specified always the first
data.object will be returned.
Note: Detailed specification should be made in combination with the originator slot in the receiving function if results are piped.
Returns:
Data object from the specified slot
list of data objects from the slots if 'data.object' is vector or
an RLum.Results for drop = FALSE.
0.3.3
Sebastian Kreutzer, Institute of Geography, Heidelberg University (Germany) , RLum Developer Team
Kreutzer, S., 2025. get_RLum(): General accessor function for RLum-class objects. Function version 0.3.3. 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.2. https://r-lum.github.io/Luminescence/
RLum.Data.Curve, RLum.Data.Image, RLum.Data.Spectrum, RLum.Analysis, RLum.Results
## Example based using data and from the calc_CentralDose() function
## load example data
data(ExampleData.DeValues, envir = environment())
## apply the central dose model 1st time
temp1 <- calc_CentralDose(ExampleData.DeValues$CA1)
## get results and store them in a new object
temp.get <- get_RLum(object = temp1)
Run the code above in your browser using DataLab