I've got a list of dataframes and am trying to change the first colname using the lapply method
frames<-lapply(frames,function(x){ colnames(frames[[x]])[1]<-"date"})
is returning the error
Error in `*tmp*`[[x]] : invalid subscript type 'list'
I am not sure why it would produce this error as my understanding is that this should apply
colname[1]<-"date"
to every data frame in the list
If anyone can tell me the root of this error I would be very grateful!