You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attr(x, "attrname") <- form looks like it modifies-in-place, but it actually doesn't:
Replacement functions act like they modify their arguments in place, and have the special name xxx<-. [...] I say they “act” like they modify their arguments in place, because they actually create a modified copy. [...] Built-in functions that are implemented using .Primitive() will modify in place.
/* https://github.com/truecluster/bit/blob/master/src/attrutil.c */voidR_bit_set_attr(SEXPx, SEXPwhich, SEXPvalue)
{
/* xx looking at R sources setAttrib would directly accept a string, however this is not documented */setAttrib(x, install(CHAR(STRING_ELT(which, 0))), value);
}
It might be worthwhile for me to do the same here, given that I expect tsv2label to be working with very large columns. I'll see how it goes with further testing on real datasets.
The text was updated successfully, but these errors were encountered:
The
attr(x, "attrname") <-
form looks like it modifies-in-place, but it actually doesn't:data.table
andbit
therefore call up a C function to modify attributes in place:It might be worthwhile for me to do the same here, given that I expect tsv2label to be working with very large columns. I'll see how it goes with further testing on real datasets.
The text was updated successfully, but these errors were encountered: