Cars         A      B
Honda        5      3     
Kia          7      5
BMW          4      8
Mazda        6      10
Hyundai      15     12
Lexus        22     19
Toyota       40     50
Jeep         60     50
The above figure is my dataframe. From this i want to compare column A with column B and extract values in A which are greater or equals to B (A>=B).
I tried to solve this by using function
pmax(Cars$A,Cars$B) 
But it gave me this result - 5,7,8,10,15,22,50,60
The result I want - 5,7,15,22,60
 
     
    