Google News
logo
R - Quiz(MCQ)
How will you check if an element is present in a vector?
A)
Match()
B)
Search()
C)
Dismatch()
D)
Mismatch()

Correct Answer :   Match()


Explanation : It can be done using the match () function- match () function returns the first appearance of a particular element. The other way is to use %in% which returns a Boolean value either true or false.

Advertisement