我的test.txt文件看起来像
"Nr" | | "X1" | | "ID_T20" | | "Herstellernummer" | | "Werksnummer" | | "Fehlerhaft" "1" | | 1 | | "20-211-2111-14" | | "211" | | "2111" | | 0
我尝试了很多命令将其导入这样的数据框架:
"Nr" , "X1" , "ID_T20" , "Hersteller" , "Werksnummer" , "Fehlerhaft"
"1" , 1 , "20-211-2111-14" , "211" , "2111" ,0
你能帮我吗?
可能:
x = strsplit(readLines(x), "\|\|")[[1]]
x = data.frame(x, stringsAsFactors=F)