2014-02-21 159 views

回答

3

一種解決方案是將文件讀取爲字符串並用新行符號替換分號。

fileName = 'myfile.txt' 
filecontent = readChar(fileName, file.info(fileName)$size) 
filecontent = gsub(";", "\n", filecontent) 
con = textConnection(filecontent) 
read.table(con,sep=",")