promptOpenFile {PBSmodelling}R Documentation

Display an "Open File" Dialogue

Description

Display the default Open prompt provided by the Operating System.

Usage

promptOpenFile(initialfile="", filetype=list(c("*","All Files")), 
               open=TRUE)

Arguments

initialfile file name of the text file containing the list.
filetype a list of character vectors indicating file types made available to users of the GUI. Each vector is of length one or two. The first element specifies either the file extension or "*" for all file types. The second element gives an optional descriptor name for the file type. The supplied filetype list appears as a set of choices in the pull-down box labelled “Files of type:"”.
open logical: if TRUE display Open prompt, if FALSE display Save As prompt.

Value

The file name and path of the file selected by the user.

See Also

promptSaveFile

Examples

## Not run: 
# Open a filename, and return it line by line in a vector
scan(promptOpenFile(),what=character(),sep="\n")

# Illustrates how to set filetype.
promptOpenFile("intial_file.txt", filetype=list(c(".txt", "text files"), 
               c(".r", "R files"), c("*", "All Files")))
## End(Not run)

[Package PBSmodelling version 2.06 Index]