So I have a bunch of data frames in a list object. Frames are organised such as
ID Category Value
2323 Friend 23.40
3434 Foe -4.00
And I got them into a list by following this topic.
Now how do I recursively run a function in each data frame? For example, how would I use tolower(colnames(x)) to change column names within data frames to lowercase?
Here is a sample
data.frameand alistwith thatdata.framerepeated twice.If you just wanted to change the names of the original
data.frame, try:If you wanted to change the names of all the
data.frames in thelist, try: