I have two list l1 and l2 that I would like to combined to look like the expected, and get the mean using lapply. I would like it to be more effecient so that I don't have to type out the values everytime, because I would like to use this for a larger list. What might be a better way of accomplishing this?
l1 <- list(1,2,3,4,5)
l2 <- list(6,7,8,9,10)
expected <- list(c(1,6), c(2,7), c(3,8), c(4,9), c(5,10))
lapply(expected, mean)
Thank you!
