It depends on what you want to do. If you want to add a different value for each item in the list, I think the easiest way is:
Vec <- c("herry",17,...) i=0 list1 <- lapply(list1, function(x) {i=i+1 ; append(x,Vec[i])})
If each vector in your list has the same length, then there are several shortcuts that you can also use. If you want to add the same value to each item in the list:
list1 <- lapply(list1, function(x) append(x, "NewEl"))
source share