Learn R Programming

dmdScheme (version 1.3.5)

as_dmdScheme: Generic function to convert the data stored in the object x into a new object of class dmdScheme...

Description

Generic function to convert the data stored in the object x into a new object of class dmdScheme...

Usage

as_dmdScheme(x, keepData = FALSE, ..., verbose = FALSE)

# S3 method for dmdSchemeData_raw as_dmdScheme( x, keepData = TRUE, convertTypes = TRUE, warnToError = TRUE, checkVersion = TRUE, ..., verbose = FALSE )

# S3 method for dmdSchemeSet_raw as_dmdScheme( x, keepData = FALSE, warnToError = TRUE, convertTypes = TRUE, checkVersion = TRUE, ..., verbose = FALSE )

# S3 method for xml_document as_dmdScheme(x, keepData = TRUE, useSchemeInXml = NULL, ..., verbose = FALSE)

Value

dmdScheme as object of class dmdScheme_set

Arguments

x

object to be converted

keepData

if the data should be kept or replaced with one row with NAs

...

additional arguments for methods

verbose

give verbose progress info. Useful for debugging.

convertTypes

if TRUE, the types specified in the types column are used for the data type. Otherwise, they are left at type character

warnToError

if TRUE, warnings generated during the conversion will raise an error

checkVersion

if TRUE, a version mismatch between the package and the data x will result in an error. If FALSE, the check will be skipped.

useSchemeInXml

if TRUE, use scheme definition in xml and raise an error if the xml does not contain a scheme definition. If False, use the scheme definition from the corresponding installed package, even if the xml contains a scheme definition. if NULL (the default), use the definition in the xml if it contains a definition, if not use the corresponding definition from the installed package.

Examples

Run this code
as_dmdScheme(dmdScheme_raw(), keepData = TRUE)
as_dmdScheme(dmdScheme_raw()$Experiment)

xml <- as_xml(dmdScheme_example())
x <- as_dmdScheme(xml)
all.equal(dmdScheme_example(), x)


Run the code above in your browser using DataLab