copy-on-modify: copy created when an object with single name gets modified

前端 未结 0 1837
被撕碎了的回忆
被撕碎了的回忆 2020-12-16 12:43

why does y get copied when I modify the y like this: y[[3]]] <- 5L? The book Advanced R says it shouldn\'t be copied.

x <- c(1, 2, 3)
cat(tracemem(x), &         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题