Intermediate R
Q47 / 100

How are environments different from lists in R?

Correct! Well done.

Incorrect.

The correct answer is B) Environments have reference semantics (mutable in place) while lists are copied on modification (copy-on-modify semantics)

B

Correct Answer

Environments have reference semantics (mutable in place) while lists are copied on modification (copy-on-modify semantics)

Explanation

Environments are mutable and passed by reference, so modifying them inside a function affects the original; lists follow R's usual copy-on-modify value semantics.

Progress
47/100