Intermediate R
Q71 / 100

What is the difference between "deep copy" semantics and reference semantics as they apply to standard R vectors and lists?

Correct! Well done.

Incorrect.

The correct answer is B) R uses copy-on-modify: assigning a vector/list to a new variable initially shares memory, but modifying either copy triggers an independent copy, so changes do not affect the original

B

Correct Answer

R uses copy-on-modify: assigning a vector/list to a new variable initially shares memory, but modifying either copy triggers an independent copy, so changes do not affect the original

Explanation

R's copy-on-modify semantics mean two variables can initially point to the same data, but as soon as one is modified, R makes a copy so the other remains unchanged.

Progress
71/100