I try to use “#” as the field separator to reading file into a data frame. But it looks like R can not recognize it. Why I can not use “#” as the field separator?
Thanks
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.
See
?read.table. You need to alter thecomment.charargument as this is over-riding your attempts to set the delimiter to#.Try
read.table(foo.txt, sep = "#", comment.char = "")Setting
comment.char = ""turns of interpretation of comments (from?read.table()):