boul789
boul789

Reputation: 17

How to display whole content of a file

I attempted to read in data from a list of about 120 comma-separated value files into a single data frame in R. However, R only displays a small portion of the data, like:

2499   2003-11-04          NA         NA   2

2500   2003-11-05  3.17000000  0.5240000   2

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

Is there a reason why so many rows were omitted? Do you know how I can get all the rows to display?

Thanks

Upvotes: 0

Views: 3430

Answers (2)

James Wu
James Wu

Reputation: 31

just as @akru, you can use options(max.print= ...) to reset the print option. the below you can take a reference:

#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

hope it clear.

Upvotes: 2

akrun
akrun

Reputation: 887128

After checking the options(), change it if needed

options(max.print = 1e7)

Upvotes: 1

Related Questions