Using two vectors, I want to generate a third vector that should have pairwise maximum values from two vectors. Is there any R function to find the pairwise minimum and maximum from two vectors?

E.g.

a = c(10,1,2,31,41,14,15)

b = c(11,0,5,32,40,12,19)

Result for max = 11 1 5 32 41 14 19

E.g.

a = c(10,1,2,31,41,14,15)

b = c(11,0,5,32,40,12,19)

Result for max = 11 1 5 32 41 14 19