as.dfObj {tablesgg} | R Documentation |
Promote a Data Frame to Another Object Class
Description
Promote a data frame to another object class, or do validity checking of such an object. This is an internal function not intended to be called by package users.
Usage
as.dfObj(x, objClass)
Arguments
x |
An object inheriting from |
objClass |
Character string giving the class of the object to be returned/ checked. One of: "tblEntries", "tblBlocks", "prEntries", "prHvrules", "prBlocks". |
Details
This is a backend to the as.<objClass>
functions.
The purpose of this function is to reduce code repetition by factoring out common tasks when promoting a data frame to one of the data frame-based objects in the package (or checking the validity of such objects).
For all objects, row names are set equal to the id
column.
Value
An object with S3 classes given by objClass
and "data.frame".
See Also
tblEntries
, tblBlocks
,
prEntries
, prHvrules
, prBlocks
;
dfSpecs
returns info about the fields required for each
object class.