how to give column names for a data in R
hello,
I have a file with 1117 columns and I have the names of these columns but how to give the names to those columns
it is not efficient to write
colnames(data)=c("name1", "name2",.....) because they are 1117 names
any help
• 6,326 views
•
link
1 answer
N = 1117; nms = paste0("Name", 1:N); colnames(data) = nms; rm(N, nms)
• 0 views
•
link
Log in to answer this question.
@Charles Plessy could you please write your comment here
I do not know what is going wrong with Biostars, I wrote my comment and then it gave me:
Anyway, it is now covered by the other comments (read from a file or use
paste)where are the column names? in another file?
yes the are in another file
Thank you very much :)
What R commands are you using to read your data?