more: Display the contents of a file to the R console

Description Usage Arguments Value Author(s) See Also Examples

Description

Display the contents of a file to the R console

Usage

1
more(file, n = -1, display = c("all", "head", "tail"))

Arguments

file

Text string giving the file name

n

Integer specifying the maximum number of lines to read from the file. This is passed to the n argument of readLines. The default is -1, which will read all the lines in the file.

display

Text string that uniquely identifies one of "all", "head", or "tail". Defaults to "all", which causes all lines read from the file to be displayed, "head" shows the first 6 lines that were read, and "tail" shows the last 6 lines that were read.

Value

Returns nothing, but it does display the contents of the file on the R console.

Author(s)

Landon Sego

See Also

readLines

Examples

1
2
3
4
cat("Here's a file\n", "with a few lines\n",
    "to read.\n", sep = "", file = "tmpFile.txt")
more("tmpFile.txt")
unlink("tmpFile.txt")


Search within the Smisc package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.