promptOpenFile {PBSmodelling}R Documentation

Display Open File Dialog

Description

Displays the default open file prompt provided by the Operating System.

Usage

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

Arguments

initialfile file name of text file containing the list.
filetype a list of character vectors indicating what filetypes to look for. Each vector is of length one or two, and specifies the file extension, or "*" (for all filetypes). The second element is an optional name for the file type describing the file type.
open If True display Open file prompt, if False display Save File prompt.

Value

The filename and path of file selected by 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 0.60 Index]