.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,
...,
pipe = NULL,
ignore = NULL,
idiomatic_class = NULL,
remove = NULL,
one_liner = FALSE
)
Arguments
x |
The object to construct |
code |
The code constructing the object before attribute reparation |
... |
Forwarded to |
pipe |
Which pipe to use, either |
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. |
one_liner |
Boolean. Whether to collapse the output to a single line of code. |
Value
A character vector