Last data update: 2014.03.03

R: General set function for RLum S4 class objects
set_RLumR Documentation

General set function for RLum S4 class objects

Description

Function calls object-specific set functions for RLum S4 class objects.

Usage

set_RLum(class, originator, .uid = .create_UID(), .pid = NA_character_, ...)

Arguments

class

RLum (required): name of the S4 class to create

originator

character (automatic): contains the name of the calling function (the function that produces this object); can be set manually.

.uid

character (automatic): sets an unique ID for this object using the internal C++ function .create_UID.

.pid

character (with default): option to provide a parent id for nesting at will.

...

further arguments that one might want to pass to the specific set method

Details

The function provides a generalised access point for specific RLum objects.
Depending on the given class, the corresponding method to create an object from this class will be selected. Allowed additional arguments can be found in the documentations of the corresponding RLum class: RLum.Data.Curve, RLum.Data.Image, RLum.Data.Spectrum, RLum.Analysis and RLum.Results

Value

Returns an object of the specified class.

Function version

0.3.0 (2016-05-02 09:43:47)

Author(s)

Sebastian Kreutzer, IRAMAT-CRP2A, Universite Bordeaux Montaigne (France)
R Luminescence Package Team

See Also

RLum.Data.Curve, RLum.Data.Image, RLum.Data.Spectrum, RLum.Analysis, RLum.Results

Examples


##produce empty objects from each class
set_RLum(class = "RLum.Data.Curve")
set_RLum(class = "RLum.Data.Spectrum")
set_RLum(class = "RLum.Data.Spectrum")
set_RLum(class = "RLum.Analysis")
set_RLum(class = "RLum.Results")

##produce a curve object with arbitrary curve values
object <- set_RLum(
class = "RLum.Data.Curve",
curveType = "arbitrary",
recordType = "OSL",
data = matrix(c(1:100,exp(-c(1:100))),ncol = 2))

##plot this curve object
plot_RLum(object)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Luminescence)
Welcome to the R package Luminescence version 0.6.0 [Built: 2016-05-30 16:47:30 UTC]
A stimulated feldspar grain: 'I'm so excited and I just can't hide it.'
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Luminescence/set_RLum.Rd_%03d_medium.png", width=480, height=480)
> ### Name: set_RLum
> ### Title: General set function for RLum S4 class objects
> ### Aliases: set_RLum
> ### Keywords: utilities
> 
> ### ** Examples
> 
> 
> ##produce empty objects from each class
> set_RLum(class = "RLum.Data.Curve")

 [RLum.Data.Curve]
	 recordType: NA
	 curveType: NA
	 measured values: 1
	 .. range of x-values: 0 0
	 .. range of y-values: 0 0
	 additional info elements: 0> set_RLum(class = "RLum.Data.Spectrum")

 [RLum.Data.Spectrum]
	 recordType: Spectrum
	 curveType: NA
	 .. recorded frames: 1
	 .. .. measured values per frame: 1
	 .. .. range wavelength/pixel: Inf -Inf
	 .. .. range time/temp.: Inf -Inf
	 .. .. range count values: NA NA
	 additional info elements: 0> set_RLum(class = "RLum.Data.Spectrum")

 [RLum.Data.Spectrum]
	 recordType: Spectrum
	 curveType: NA
	 .. recorded frames: 1
	 .. .. measured values per frame: 1
	 .. .. range wavelength/pixel: Inf -Inf
	 .. .. range time/temp.: Inf -Inf
	 .. .. range count values: NA NA
	 additional info elements: 0> set_RLum(class = "RLum.Analysis")

 [RLum.Analysis]
	 originator: NA()
	 protocol: NA
	 additional info elements:  0
	 number of records: 0
	 >> This is an empty object and cannot be used for further analysis! <<> set_RLum(class = "RLum.Results")

 [RLum.Results]
	 originator: NA()
	 data: 0
 	 .. $ : list
	 additional info elements:  0> 
> ##produce a curve object with arbitrary curve values
> object <- set_RLum(
+ class = "RLum.Data.Curve",
+ curveType = "arbitrary",
+ recordType = "OSL",
+ data = matrix(c(1:100,exp(-c(1:100))),ncol = 2))
> 
> ##plot this curve object
> plot_RLum(object)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>