Skip to content

Instantly share code, notes, and snippets.

@jimhester
Last active August 29, 2015 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimhester/a5d3c0cb58949bef2a99 to your computer and use it in GitHub Desktop.
Save jimhester/a5d3c0cb58949bef2a99 to your computer and use it in GitHub Desktop.
less function for R
withOptions <- function(optlist, expr)
{
oldopt <- options(optlist)
on.exit(options(oldopt))
expr <- substitute(expr)
eval.parent(expr)
}
less = function(x) {
withOptions(list(pager='less', dplyr.print_min=.Machine$integer.max, width=10000L), page(x, method='print'))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment