如何显示文件的整个内容

时间:2016-12-29 02:51:45

标签: r

我试图将大约120个逗号分隔值文件列表中的数据读入R中的单个数据框。但是,R只显示一小部分数据,如:

2499   2003-11-04          NA         NA   2

2500   2003-11-05  3.17000000  0.5240000   2

 [ reached getOption("max.print") -- omitted 769587 rows ]

为什么有这么多行被省略了?你知道我怎样才能显示所有行吗?

由于

2 个答案:

答案 0 :(得分:2)

就像@akru一样,您可以使用选项(max.print = ...)来重置打印选项。 以下您可以参考:

#Find system defualt max print rows
getOption("max.print")

#take example
a <- seq(1, getOption('max.print')+99, 1)
print(a)
#the result as follow
# [1]   1   2   3   4   5   6   7   8   9  10 
#.....
# [9991]  9991  9992  9993  9994  9995  9996  9997  9998  9999 10000
# [ reached getOption("max.print") -- omitted 99 entries ]


#Reset the max print option, the 
options(max.print = length(a))
print(a)
#the result as follow
# [1]   1   2   3   4   5   6   7   8   9  10 
#.....
#[10096] 10096 10097 10098 10099
希望它清楚。

答案 1 :(得分:1)

检查options()后,根据需要进行更改

options(max.print = 1e7)