Change letter case of column names
Easy Solution
names(DF) <- toupper(names(DF))
Here is a one-liner implementing "the easiest way to match column names among data sets" that I can think of:
## Columns 1:3 left unaltered since they are not place names.
names(my.data2)[-1:-3] <- tolower(names(my.data2)[-1:-3])
## View the results
names(my.data2)
# [1] "landuse" "units" "grade" "clay"
# [5] "lincoln" "basinandrange" "mccartney" "maple"
modern solution
This is now a job for janitor::clean_names()
, just choose case
parameter that fits you need.