0

在 R 中,我试图只读取文本文件的前四列。有没有办法做到这一点?这是一些示例代码:

example <- read.table("example.txt", header=TRUE)

当我运行它时,我收到以下错误消息:

Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
  line 1 did not have 9 elements

这就是为什么我只想阅读前四列的原因。

4

0 回答 0