I'm new to R and need a bit of help. Basically, I have microarray data in a data frame and would like to append to the column name. Columns are named: A, B, C, etc.
[user] > names(first.df)
[1] "A" "B" "C" "D"
Another data frame identifies each factor (A, B, C, etc.) as "good" or "bad"
[user] > second.df
[1] A good
B bad
C bad
D good
Is there any way to add the "good"/"bad" to the column header of the first data frame?
[user] > names(first.df)
[1] "A-good" "B-bad" "C-bad" "D-good"
I've tried isolating names to their own data frame (e.g. names(first.df) <- c(names(first.df), second.df[,2]) and merging with no luck. Any advice?