I\'m pretty frustrated because I dont know how I achieve the naming of the columns and rows in a list of data.frames. I mean I want to avoid using a loop. So I figured I cou
You need to remember that the object x inside the lapply is not the original object, but a copy. Changing the colnames of the copy does not impact the original object. You need to return x in order to get a new copy of the object that includes the new names.
new_obj = lapply(a, function(x) {
colnames(x) <- paste("col",1:10,sep="")
return(x)
})