On Fri, Apr 14, 2017 at 11:27 PM, Patrick Perry <ppe...@stern.nyu.edu> wrote:
> Is the following expected behavior? I would expect that modifying y's 
> attributes should not affect x.

Yes this is expected. Environments and external-ptr objects are never
copied on assignment, hence in your example 'x' and 'y' are the same
object. See e.g. ?reg.finalizer or section 5.13 of "writing r
extensions" on external pointers and weak references.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to