I have a dataframe where the column names are values (although, they are actually text eg Value_1, Value_2 etc). I also have a table with the values (Value_1 etc) and text column names (Corn, Soy etc). I would like to match the value columns in these two dataframes and replace the Value_1, Value_2 column names with the text name. I'm guessing there's a way to do this using match, but I'm new to R and can not figure it out.
So, I have:
Site Value_1 Value _2 Value_3
A
B
C
and...
Value Name
Value_1 Corn
Value_2 Soy
Value_3 Hay
and I want
Site Corn Soy Hay
A
B
C
Again, I am new to R so please explain it to me like I'm an idiot. I appreciate the help!