If we create a list, then a copy of that list:
l1 <- list(1,2,3) l2 <- l1
We can use
lobstr to see that the two lists have the same reference
And can confirm this even further, using the first element in each list:
lobstr::obj_addr(l1[]) == lobstr::obj_addr(l2[])
BUT my mental model breaks down when we start looking at subsets of the list since shouldn't these too be identical?
I'm even further confused by their unique references since these are identical above.
Any ideas? Thanks!