gui.dir.choose {utilitiesR}R Documentation

cross-platform directory selection interface

Description

This is a cross-platform function to allow the user to choose a directory interactively. If graphics=TRUE, choose.dir is used on Windows (file dialog), and tcltk::tk_choose.dir otherwise (& if supported), and an interactive text interface if all else fails.

Usage

  gui.dir.choose(startDir = getwd(),
    title = "choose a directory", multiple = FALSE,
    graphics = TRUE)

Arguments

startDir

start directory (default current directory)

title

title for dialog

multiple

whether to allow selection of multiple items

graphics

whether to present a graphics interface (if possible)

Value

the dir(s) chosen (character vector). If is.empty is TRUE, the user selected 'Cancel'.

See Also

Other ui: dir.browse, file.browse, Filters, gui.file.choose, gui.menu, gui.readline, gui.yesno, tk_entry.dialog, tk_select.list


[Package utilitiesR version 1.8.4 Index]