1

In Advanced r (section 6.5.2 Replacement Functions) it's stated that as opposed to a replacement function, built in functions implemented using primitive will modify in place (the address should stay the same after modification).

I don't find that to be the case, has this changed? or are my tired eyes doing something wrong?

library(pryr)
x <- 1:10
pryr::address(x)
x[3] <- 7L
pryr::address(x)
Preston
  • 7,399
  • 8
  • 54
  • 84

0 Answers0