file.show {base}R Documentation

Display One or More Files

Description

Display one or more files.

Usage

file.show(..., header = rep("",nfiles), title = "R Information",
          delete.file=FALSE, pager=getOption("pager"))

Arguments

... one or more character vectors containing the names of the files to be displayed.
header character vector (of the same length as the number of files specified in ...) giving a header for each file being displayed. Defaults to empty strings.
title an overall title for the display. If a single separate window is used for the display, title will be used as the window title. If multiple windows are used, their titles should combine the title and the file-specific header.
delete.file should the files be deleted after display? Used for temporary files.
pager the pager to be used.

Details

This function provides the core of the R help system, but it can be used for other purposes as well.

Note

How the pager is implemented is highly system dependent.

The basic Unix version concatenates the files (using the headers) to a temporary file, and displays it in the pager selected by the pager argument, which is a character vector specifying a system command to run on the set of files.

Most GUI systems will use a separate pager window for each file, and let the user leave it up while R continues running. The selection of such pagers could either be done using “magic” pager names being intercepted by lower-level code (such as "internal" and "console" on Windows), or by letting pager be an R function which will be called with the same arguments as file.show and take care of interfacing to the GUI.

Not all implementations will honour delete.file. In particular, using an external pager on Windows does not, as there is no way to know when the external application has finished with the file.

Author(s)

Ross Ihaka, Brian Ripley.

See Also

files, list.files, help.

Examples

file.show(file.path(R.home(), "COPYRIGHTS"))

[Package base version 2.1.0 Index]