Equivalent to unix "less" command within R console

Solution 1:

There is also page() which displays a representation of an object in a pager, like less.

dat <- data.frame(matrix(rnorm(1000), ncol = 10))
page(dat, method = "print")

Solution 2:

Not really. There are the commands

  • head() and tail() for showing the beginning and end of objects
  • print() for explicitly showing an object, and just its name followed by return does the same
  • summary() for concise summary that depends on the object
  • str() for its structure

and more. An equivalent for less would be a little orthogonal to the language and system. Where the Unix shell offers you less to view the content of a file (which is presumed to be ascii-encoded), it cannot know about all types.

R is different in that it knows about the object types which is why summary() -- as well as the whole modeling framework -- are more appropriate.

Follow-up edit: Another possibility is provided by edit() as well as edit.data.frame().