tbl_internal: Internal utilities for ICU data objects

Description Usage Arguments Value

Description

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.

Usage

1
2
3
4
5
unclass_tbl(x)

reclass_tbl(x, template, stop_on_fail = TRUE)

as_ptype(x)

Arguments

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

Value


septic-tank/ricu documentation built on Jan. 30, 2021, 8:40 p.m.