Advanced
R
Q90 / 100
What does the "data.table" package's syntax "DT[, newcol := value]" do compared to base R or dplyr equivalents?
Correct! Well done.
Incorrect.
The correct answer is B) It modifies DT in place (by reference) to add or update "newcol", avoiding the overhead of copying the entire table
B
Correct Answer
It modifies DT in place (by reference) to add or update "newcol", avoiding the overhead of copying the entire table
Explanation
The ":=" operator in data.table performs in-place modification by reference, which is significantly more memory- and time-efficient for large datasets compared to copy-on-modify approaches.
Progress
90/100