in R Language by
Q:
How will you check if an element 25 is present in a vector?

▼ Show 1 Answer

0 votes
by
There are various ways to do this-

It can be done using the match () function- match () function returns the first appearance of a particular element.

The other is to use %in% which returns a Boolean value either true or false.

Is.element () function also returns a Boolean value either true or false based on whether it is present in a vector or not.
Learn More with Madanswer

Related questions

+2 votes
asked Jul 28, 2019 in R Language by Aarav2017
...