Learn R Programming

svDialogs (version 1.0.0)

dlg_dir: Modal dialog to select a directory.

Description

Select an existing directory, or create a new one.

Usage

dlg_dir(default = getwd(), title, ..., gui = .GUI)

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

# 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 path to the default directory that is proposed (e.g., current working directory).

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. Use its gui$res component to get the returned directory (the string is empty when the user cancelled the dialog box, see example).

See Also

dlg_open(), dlg_save()

Examples

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

Run the code above in your browser using DataLab