Skip to content
Prev 13275 / 63421 Next

directing print.packageInfo to a file

But file.show() can be tuned by playing with options(pager).

In your case, something like

  oop <- options(pager = function(file, ...) writeLines(readLines(file)))
  capture.output(print.packageInfo(help(package = "stats")),
	         file = "abc.txt")
  options(oop)

gives

R> length(readLines("abc.txt"))
[1] 345

Hth
-k