search for: 000000c00d128

Displaying 1 result from an estimated 1 matches for "000000c00d128".

2016 Mar 13
1
formals(x)<- drops attributes including class
...t;- structure(function() {}, foo="foo", class=c("foo")) > str(fcn) function () - attr(*, "srcref")=Class 'srcref' atomic [1:8] 1 18 1 30 18 30 1 1 .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x000 000000c00d128> - attr(*, "foo")= chr "foo" - attr(*, "class")= chr "foo" > formals(fcn) <- list(a=1) > str(fcn) function (a = 1) > attributes(fcn) NULL TROUBLESHOOTING: >From the definition of formals()<-, it's quite clear why this happens: &...