fromDatatoMzQC: Allow conversion of plain named lists to mzQC objects

View source: R/MzQC_classes.R

fromDatatoMzQCR Documentation

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

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


PTXQC documentation built on March 22, 2022, 5:08 p.m.