Learn R Programming

svDialogs (version 0.9-57)

dlgDir: A select directory dialog box

Description

Allows to easily select a directory.

Usage

dlgDir(default = getwd(), title, …, gui = .GUI)

## These should not be called directly # S3 method for gui dlgDir(default = getwd(), title, …, gui = .GUI) # S3 method for textCLI dlgDir(default = getwd(), title, …, gui = .GUI) # S3 method for nativeGUI dlgDir(default = getwd(), title, …, gui = .GUI)

Arguments

default

the directory to start with.

title

a title to display on top of the dialog box.

pass further arguments to methods.

gui

the 'gui' object concerned by this dialog box.

Value

The modified 'gui' object is returned invisibly. The choosen directory, or an empty string if the cancel button was clicked is found in gui$res (see example).

See Also

dlgOpen, dlgSave

Examples

Run this code
# NOT RUN {
### A quick default directory changer
setwd(dlgDir(default = getwd())$res)
# }

Run the code above in your browser using DataLab