0
我有以下的txt文件:R讀取文件用花括號
Header1 Header2 Header3
1 5 {Joe, John, Sam}
2 9 {Mike}
3 5 {Bob, Alice}
我想用下面的命令來讀取它,但它給出了一個錯誤:
data = read.table("file_location/data.txt", sep=" ", strip.white=TRUE, header=TRUE)
more columns than column names
我怎麼能讀這樣的文件?
做你必須做的這在r?用引號替換大括號(使用你最喜歡的文本編輯器或shell命令)並正常讀取 – rawr 2015-02-24 16:25:30
是的,在R.而我不想開始替換字符。 – Bob 2015-02-24 16:30:17