Displays the contents of a text file with line numbers and more
Displays the contents of a text file with line numbers and more.
## Default S3 method: displayCode(con=NULL, code=NULL, numerate=TRUE, lines=-1, wrap=79, highlight=NULL, pager=getOption("pager"), ...)
con |
A |
code |
|
numerate |
If |
lines |
If a single |
wrap |
The (output) column |
highlight |
A |
pager |
If |
... |
Additional arguments passed to |
Returns (invisibly) the formatted code as a character
string.
Henrik Bengtsson
file.show
().
file <- system.file("DESCRIPTION", package="R.utils") cat("Displaying: ", file, ":\n", sep="") displayCode(file) file <- system.file("NEWS", package="R.utils") cat("Displaying: ", file, ":\n", sep="") displayCode(file, numerate=FALSE, lines=100:110, wrap=65) file <- system.file("NEWS", package="R.utils") cat("Displaying: ", file, ":\n", sep="") displayCode(file, lines=100:110, wrap=65, highlight=c(101,104:108))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.