choose.dir {utils} | R Documentation |
Use a Windows shell folder widget to choose a folder interactively.
choose.dir(default = "", caption = "Select folder")
default |
which folder to show initially |
caption |
the caption on the selection dialog |
This brings up a dialog box with a text field to enter the folder path and a ‘Browse’ button to access 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.
A length-one character vector, character NA
if
‘Cancel’ was selected.
if (interactive()) choose.dir(getwd(), "Choose a suitable folder")