Description Usage Arguments Details References See Also
setattr
changes the attribute of an object by reference, that is,
without making any copy. This is an imported and re-exported function from
the data.table package with two minor enhancements (see Details).
1 |
x |
an object |
name |
the name of the attribute (a character string) |
value |
the value to assign to the attribute. If value is NULL,
|
check_for |
an object which might have the same address in RAM as
'x' but should not be affected by |
The original setattr
function has an
undesirable consequence on !FALSE
or !TRUE
if the 'x' object
is a logical scalar (see References). This function corrects this bug.
Additionally, the standard attr
function is applied for such an 'x'
object, which is referenced to the 'check_for' object (has the same address
in RAM, see address
).
https://github.com/Rdatatable/data.table/issues/1281
setattr
for the original version in the data.table
package
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.