It might be possible to wrap your expression in capture.output, and then page the result to the terminal.
pager <- function(cmd,nlines=10){
output = capture.output(cmd)
pages = seq(1,length(output),by=nlines)
for(p in pages){
f = p
l = min(p+nlines-1,length(output))
cat(paste(output[f:l],"\n"))
readline("*more*")
}
return(invisible(0))
}
Usage: pager(ls()), then hit Return (not space or anything else) at each 'more' prompt.
currently it doesn't return the value. Oh and it fails if there's no output. But you can fix these :)
Or use emacs with ESS and let it all scroll back...