Learn R Programming

PTXQC (version 1.0.14)

fromDatatoMzQC: Allow conversion of plain named lists to mzQC objects

Description

The plain-R representation of your mzQC objects must be wrapped in an outer list, if your mzQC object representation is already a list because upon detecting lists, this function will call 'class$fromData(element)' for every element.

Usage

fromDatatoMzQC(mzqc_class, data)

Arguments

mzqc_class

Prototype of the class to convert 'data' into

data

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

Examples

Run this code
 data = MzQCcvParameter$new("acc", "myName", "value")
 data_recovered = fromDatatoMzQC(MzQCcvParameter, list(jsonlite::fromJSON(jsonlite::toJSON(data))))
 data_recovered

Run the code above in your browser using DataLab