I have a number of vectors and want to use mapply to sum the items in index order. It works fine with small numbers of vectors, but I need to input a list of a large number of them.
vec1 <- c(1, 2, 3, 4)
vec2 <- c(2, 4, 6, 8)
vec3 <- c(3, 6, 9, 12)
mapply(sum,vec1,vec2,vec3)
[1] 6 12 18 24
However I have a large number of very long vectors (length=2,000,000) and would like to collect the names into a list or variable rather than naming each individually in the mapply() call. Something on the order of mapply(sum,list_of_vectors)