promptOpenFile {PBSmodelling} | R Documentation |
Display the default Open prompt provided by the Operating System.
promptOpenFile(initialfile="", filetype=list(c("*","All Files")), open=TRUE)
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. |
The file name and path of the file selected by the user.
## 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)