Learn R Programming

Luminescence (version 0.4.1)

merge_RLum.Data.Curve: Merge function for RLum.Data.Curve S4 class objects

Description

Function allows merging of RLum.Data.Curve objects in different ways

Usage

merge_RLum.Data.Curve(object, merge.method = "mean", method.info)

Arguments

object
list of RLum.Data.Curve (required): list of S4 objects of class RLum.Curve.
merge.method
character (required): method for combining of the objects, e.g. 'mean', 'sum', see details for further information and allowed methods. Note: Elements in slot info wil
method.info
numeric (optional): allows to specify how info elements of the input objects are combined, e.g. 1 means that just the elements from the first object are kept, 2 keeps only the

Value

  • Return an RLum.Data.Curve object.

Function version

0.1 (2014-12-22 13:49:02)

Details

This function simply allowing to merge RLum.Data.Curve objects without touching the objects itself. Merging is always applied on the 2nd colum of the data matrix of the object. Supported merge operations are RLum.Data.Curve "sum" All count values will be summed up using the function rowSums. "mean" The mean over the count values is calculated using the function rowMeans. "-" The row sums of the last objects are subtracted from the first object. "*" The row sums of the last objects are mutliplied with the first object. "/" Values of the first object are divided by row sums of the last objects.

References

-

See Also

merge_RLum, RLum.Data.Curve

Examples

Run this code
##load example data
data(ExampleData.XSYG, envir = environment())

##grep first and 3d TL curves
TL.curves  <- get_RLum.Analysis(OSL.SARMeasurement$Sequence.Object, recordType = "TL (UVVIS)")
TL.curve.1 <- TL.curves[[1]]
TL.curve.3 <- TL.curves[[3]]

##plot single curves
plot_RLum(TL.curve.1)
plot_RLum(TL.curve.3)

##subtract the 1st curve from the 2nd and plot
TL.curve.merged <- merge_RLum.Data.Curve(list(TL.curve.3, TL.curve.1), merge.method = "/")
plot_RLum(TL.curve.merged)

Run the code above in your browser using DataLab