Intermediate
R
Q41 / 100
What is the difference between "[" and "[[" when subsetting a list in R?
Correct! Well done.
Incorrect.
The correct answer is B) "[" returns a sublist (preserving list structure), while "[[" extracts a single element directly
B
Correct Answer
"[" returns a sublist (preserving list structure), while "[[" extracts a single element directly
Explanation
Single bracket "[" subsetting returns a list containing the selected elements, while double bracket "[[" extracts the actual element itself.
Progress
41/100