@gilles-colling.bsky.socialGilles Colling @gilles-colling.bsky.social
2026-04-07 11:30 UTC
Puzzle: how many copies does x$a[1] <- 99L trigger on a data.frame? TWO. One value changed, two full copies made. A data.frame is a list of column vectors. The list and each column are separate objects with separate reference counts. Modify one column and R copies the column AND the container. 1/2
0 likes, 0 reposts, 1 replies
3 Next post4 More from @gilles-colling.bsky.socialBackBluesky home