as_dmdScheme: Generic function to convert the data stored in the object 'x'...

View source: R/as_dmdScheme.R

as_dmdSchemeR Documentation

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 class 'dmdSchemeData_raw'
as_dmdScheme(
  x,
  keepData = TRUE,
  convertTypes = TRUE,
  warnToError = TRUE,
  checkVersion = TRUE,
  ...,
  verbose = FALSE
)

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

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

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.

Value

dmdScheme as object of class dmdScheme_set

Examples

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)



dmdScheme documentation built on Aug. 22, 2022, 9:06 a.m.