exportClassDefs: Write R code corresponding to existing class definitions.

View source: R/serialize.R

exportClassDefsR Documentation

Write R code corresponding to existing class definitions.

Description

This function and the related helper functions is used to generate R code that can be used in another R session or package to define classes and coercion methods that currently exist in this session. The idea is that we use this to create explicit R code that will recreate the classes and methods we define via defineClasses corresponding to the types in our XML schema.

This function also makes an effort to get the correct order in which the classes should be defined.

expandS4 takes care of serializing S4 objects which does not currently happen with deparse.

exportClassDef generates the code for the class.

Usage

exportClassDefs(x, file = NULL, where = globalenv(), ...)

Arguments

x

the collection of class names.

file

the name of a file or a connection to which the generated code should be written. If this is NULL, the code is not written but returned and the caller can do with it what she wants, e.g. write it to a file later, parse and evaluate it, etc..

where

the environment in which to look for the class definitions.

...

additional parameters passed to sub-functions

Author(s)

Duncan Temple Lang

See Also

defineClasses


omegahat/XMLSchema documentation built on Jan. 17, 2024, 7:08 p.m.