Reference Semantics (R6)

Then if you modify the value of the new object.

y2$b <- 2

Then the original object also changes.

y1 |> unlist()
## <Y>
##   Public:
##     a: 1
##     b: 2
##     clone: function (deep = FALSE)