| unclass_tbl | R Documentation |
In order to remove all id_tbl/ts_tbl-related attributes, as well as
extra class-labels, the exported but marked internal function
unclass_tbl() can be used. This function provides what one might expect
from an id_tbl/ts_tbl-specific implementation of the S3 generic
function data.table::as.data.table(). The inverse functionality if
provided by reclass_tbl() which attempts to add attributes as seen in
template to the object passed as x. The logical flag stop_on_fail
controls how to proceed if the attributes of template are incompatible
with the object x. Finally, in order to generate a template, as_ptype()
creates an empty object with the appropriate attributes.
unclass_tbl(x)
reclass_tbl(x, template, stop_on_fail = TRUE)
as_ptype(x)
x |
Object to modify/query |
template |
Object after which to model the object in question |
stop_on_fail |
Logical flag indicating whether to consider failed object validation as error |
unclass_tbl(): a data.table
reclass_tbl(): either an id_tbl or a ts_tbl depending on the type
of the object passed as template
as_ptype(): an object of the same type as x, but with on data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.