Say I have a vector. I need to select every two elements. I need to do this in a loop and pass it on to different vector
for eg A<-c(1:10) i want to select elements like (1,2) (3,4),(5,6) and so on and pass the sum of these two elements into another vector. required output is (3,7,11,15)