I have been trying to find a way of renaming all the columns of each data frame in the workspace in R. They just need to have the same column names. The code below is an example of two data frames (cars and trucks) that will have column names "1:10". However, I have about so many data frames and want to automatically do that.
names(cars) <- c(1:10)
names(trucks) <- c(1:10)
Thanks in advance!