This help topic is for R version 2.9.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/utils/html/choose.dir.html
choose.dir {utils}R Documentation

Choose a Folder Interactively

Description

Use a Windows shell folder widget to choose a folder interactively.

Usage

choose.dir(default = "", caption = "Select folder")

Arguments

default

which folder to show initially.

caption

the caption on the selection dialog.

Details

This brings up the Windows shell folder selection widget. With the default default = "", ‘My Computer’ (or similar) is initially selected.

To workaround a bug, on Vista and Server 2008 only folders under ‘Computer’ are accessible via the widget.

Value

A length-one character vector, character NA if ‘Cancel’ was selected.

See Also

choose.files

Examples

  if (interactive()) 
	choose.dir(getwd(), "Choose a suitable folder")

[Package utils version 2.9.0 ]