E xample 2 Create 3 vectors “a”, “b” and “d” Suppose a =c( 1 , 2 , 3 , 4 ,5) b =c( 6 , 7 , 8 , 9 ,10) d =c( 11 , 12 , 13 , 14 ,15) you want to add the corresponding values (as shown in the same color ) of all the three vectors, then we use the mapply () function. i.e., sum( 1,3,6 ), sum( 2,7,12 ), sum( 3,8,13 ), sum( 4,9,14 ), sum(5,10,15) >a=c(1,2,3,4,5) >b=c(6,7,8,9,10) >d=c(11,12,13,14,15) > mapply ( sum,a,b,d ) Output [1] 18 21 24 27 30