setwdGUI {PBSmodelling}R Documentation

Browse for Working Directory and Optionally Find Prefix

Description

Allows the user to browse a directory tree to set the working directory. Optionally, files with given suffixes can be located in the new directory.

Usage

setwdGUI(suffix)

Arguments

suffix character vector of suffixes or "" (See Details).

Details

The suffix argument is passed to a call to findPrefix after the working directory is changed (See setwd). If suffix is set to the empty string "", then findPrefix will not be called.

To use this function in a window description file, the suffix argument must be specified as the action of the widget that calls setwdGUI. Furthermore, the suffixes must be separated by commas (e.g., action=.c,.cpp). If action=, is specified, then findPrefix will not be called.

Value

If suffixes are given, a character vector of prefixes of all files in the working directory that match one of the given suffixes is returned; otherwise, the function returns invisible().

Note

If all the required arguments are missing, it is assumed that the function is being called by a GUI widget.

See Also

findPrefix, setwd

Examples

## Not run: 
#match files that end with ".a" followed by 0 or more characters, ".b" followed
#by any single character, ".c", or "-old.d" (a suffix does not have to be a
#file extension)
findPrefix(".a*", ".b?", ".c", "-old.d")
## End(Not run)

[Package PBSmodelling version 2.06 Index]