Point out the wrong statement?

Point out the wrong statement?
A. $ operator semantics are similar to that of [[
B. The [ operator always returns an object of the same class as the original
C. The $ operator is used to extract elements of a list or a data frame
D. There are three operators that can be used to extract subsets of R objects
 
Answer: c
Explanation: The [[ operator is used to extract elements of a list or a data frame. It can only be used to extract a single element and the class of the returned object will not necessarily be a list or data frame.
 

Tìm kiếm

Back
Top