数据内容
导入数据:
1 | test <-read.table("filename.txt",header=TRUE) |
会出现错误:Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :3行没有2元素
修改:
1 | test <-read.table("filename.txt",header=TRUE,fill=TRUE) |
空值设为NA
na.strings = ""
1 | test <-read.table("filename.txt",header=TRUE, fill=TRUE, na.strings = "") |