Skip to content
Prev 391128 / 398506 Next

print only a few lines of an object

You can set the "max.print" option to something other than the default
value of 99999, e.g. options(max.print=50). The number is not lines,
or characters as far as I can tell. For example setting max.print=50
causes print(iris) to display the first 10 lines followed by a
warning. On a list object it seems to apply to each part of the list,
(e.g. split(iris, iris$Species) prints 10 lines of each species. This
is a crude tool that is mostly useful if you are working with large
objects and have a bad tendency to type the object name without
thinking.

David L Carlson
On Wed, Mar 23, 2022 at 3:32 PM John Fox <jfox at mcmaster.ca> wrote: