x<-c(1,4,9,20,3,7)
i want to get a serie c(5,13,29,23,10).
 y <- c()
 for (i in 2:length(x)){
     y[i-1] <- x[i-1]+x[i]}

is there more simple way to get?
	[[alternative HTML version deleted]]

