Skip to contents

If you have a list of elements, call fromDatatoMzQC.

Usage

fromDatatoMzQCobj(mzqc_class, data, context = NULL)

Arguments

mzqc_class

Prototype of the class to convert 'data' into

data

A datastructure of R lists/arrays as obtained by 'jsonlite::fromJSON()'

context

A trace through the mzQC object tree to aid users in case of errors

Examples

 data = MzQCcvParameter$new("acc", "myName", "value")
 data_recovered = fromDatatoMzQCobj(MzQCcvParameter, jsonlite::fromJSON(jsonlite::toJSON(data)))
 data_recovered
#> <MzQCcvParameter>
#>   Public:
#>     accession: acc
#>     clone: function (deep = FALSE) 
#>     description: NA
#>     fromData: function (data, context = "MzQCcvParameter") 
#>     initialize: function (accession = NA_character_, name = NA_character_, value = NA, 
#>     isValid: function (context = "MzQCcvParameter") 
#>     name: myName
#>     self: MzQCcvParameter, R6
#>     toJSON: function (...) 
#>     value: value