a <- read.table("filename",header = F,sep = "\t",fill = F)
第一次尝试代码
read.table("downloads/homologene/btd/orthologs_search_106586_5-15-2022.tsv",header = F,sep = "\t",quote = "\"'",fill = F,dec = ".")
出现如下报错
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 67 did not have 11 elements
添加了fill = T后
read.table("downloads/homologene/btd/orthologs_search_106586_5-15-2022.tsv",header = F,sep = "\t",fill = T)
成功导入
原因:原文件中有缺失值导致报错,可以使用fill=TRUE对缺失值进行填充,