# NOT RUN {
# Let's add attributes with structure() to uncopyable types. Since
# they are not copied, the attributes are changed in place:
env <- env()
structure(env, foo = "bar")
env
# These objects that can only be changed with side effect are not
# copyable:
is_copyable(env)
structure(base::list, foo = "bar")
str(base::list)
# In expressions, calls and pairlists are safely copyable. However,
# symbols are not:
structure(quote(foo), foo = "bar")
quote(foo)
# }
Run the code above in your browser using DataLab