.cstr_repair_attributes {constructive} | R Documentation |
Repair attributes after idiomatic construction
Description
Exported for custom constructor design. In the general case an object might have more attributes than given by the idiomatic
construction. .cstr_repair_attributes()
sets some of those attributes and ignores
others.
Usage
.cstr_repair_attributes(
x,
code,
...,
ignore = NULL,
idiomatic_class = NULL,
remove = NULL,
flag_s4 = TRUE,
repair_names = FALSE
)
Arguments
x |
The object to construct |
code |
The code constructing the object before attribute repair |
... |
Forwarded to |
ignore |
The attributes that shouldn't be repaired, i.e. we expect them
to be set by the constructor already in |
idiomatic_class |
The class of the objects that the constructor produces,
if |
remove |
Attributes that should be removed, should rarely be useful. |
flag_s4 |
Boolean. Whether to use |
repair_names |
Boolean. Whether to repair the |
Value
A character vector