Is there a reason why R won’t allow me to have a number as the column name of my dataframe?
Also noticed that if i do data.frame(XX) it adds an X to all the column headers that have numbers at the front.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, because R won’t allow names of objects to start with numbers. If you were to call
attach()with the data.frame, this would cause some issues.data.frame(andread.table) function has thecheck.namesparameter (default isTRUE)From
?make.names: