假设我有一个原始文本文件f.txt,如下所示:
100040390 mmu04120:Ubiquitin mediated proteolysis
100040390 mmu05020:Parkinson's disease
100163 mmu00565:Ether lipid metabolism
如果我执行read.table(f.txt)
,它会自动按标签/空格分隔:
V1 V2 V3 V4
1 100040390 mmu04120:Ubiquitin mediated proteolysis
2 100040390 mmu05020:Parkinson's disease
3 100163 mmu00565:Ether lipid metabolism
我的问题是如何将其读入r,其中有2列,例如:
V1 V2
1 100040390 mmu04120:Ubiquitin mediated proteolysis
2 100040390 mmu05020:Parkinson's disease
3 100163 mmu00565:Ether lipid metabolism