Suppose I have a list c(1,2,3,4,5) I want to find the list c(1,1.5,2,2.5,3). basically, a list who's ith index is the average of another vector's element from 1:i.
Is there any nice ways to find this? either a package or map function?
Suppose I have a list c(1,2,3,4,5) I want to find the list c(1,1.5,2,2.5,3). basically, a list who's ith index is the average of another vector's element from 1:i.
Is there any nice ways to find this? either a package or map function?