r-lib / rlang

Low-level API for programming with R
https://rlang.r-lib.org
Other
498 stars 136 forks source link

Should env_clone() copy attributes ? #1613

Open moodymudskipper opened 1 year ago

moodymudskipper commented 1 year ago

Or offer the option.

When I think about cloning I think I will get an equivalent object, and it's not the case.

e <- ggplot2::geom_point()
e
#> geom_point: na.rm = FALSE
#> stat_identity: na.rm = FALSE
#> position_identity
rlang::env_clone(e)
#> <environment: 0x11533d198>