我的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
你能帮我吗?
答案 0 :(得分:0)
可能:
x = strsplit(readLines(x), "\\|\\|")[[1]]
x = data.frame(x, stringsAsFactors=F)