R-Lum/RLumModel

Add 'curveDescripter' [sic] to '@info' slot for simulated TL and OSL curves

Closed this issue · 4 comments

tzerk commented

RLum.Data.Curve objects for concentration levels contain the list element curveDescripter [sic, name to Descriptor], but OSL and TL do not (RF probably also). RLum.Data.Curve objects should however be homogenous and contain the same elements. If there is no meaningful value for curveDescriptor they should be NA.

(background: an upcoming S3 method for base::subset() and RLum.Analysis objects that more or less relies on an identical length of the @info list)

I have tried your solution with NA and NULL but the problem is the following one:
If I set curveDescriptor = NULL, https://github.com/R-Lum/Luminescence/blob/master/R/plot_RLum.Data.Curve.R#L109 is checking if infoelement `curveDescriptor' exists (and that's the case) and then I get the error:

Error in strsplit(object@info$curveDescripter, split = ";", fixed = TRUE) : non-character argument

So a possible solution is to check if curveDescriptor != NA (or NULL).
My idea was, that 'plot_RLum.Data.Curve` is checking the recordTypes and sets the x and y-lab automatically. So why using a curveDescriptor?

You can set it to NA_character

jup, thanks. this works:
curveDescripter = NA_character_

Indeed NA_character_ not NA_character, sorry.