1 year ago
#365711

LoveMYMAth
How to make a list of variables the header for a data frame [R]
I have a data frame with no headers. It has 561 columns. It has the generic headers like so
V1 V2 ... V561
I also have a txt. file that has all of the variable names for that data frame. They are all in one column, like so:
1 tBodyAcc-mean()-X
2 tBodyAcc-mean()-Y
3 tBodyAcc-mean()-Z
...
561 angle(Z,gravityMean)
How would I go about reading that file in and putting all those variables as the column names for the original dataset?
r
multiple-columns
names
0 Answers
Your Answer