Learn R Programming

svDialogstcltk (version 1.0.1)

dlg_open.tcltkGUI: A Tcl/Tk version of the {svDialogs} file open dialog box

Description

A Tcl/Tk version of the {svDialogs} file open dialog box

Usage

# S3 method for tcltkGUI
dlg_open(
  default = "",
  title = if (multiple) "Select files" else "Select file",
  multiple = FALSE,
  filters = dlg_filters["All", ],
  ...,
  gui = .GUI
)

Value

The path to the file to open.

Arguments

default

The default file to start with (use /dir/* or /dir/*.* to start in a given directory).

title

A title to display on top of the dialog box.

multiple

Is a multiple selection of files allowed?

filters

A specification of file filters as a nx2 matrix, or a character string with even number of items. First items is the label, second one is the filter. See dlg_filters for examples. This is currently ignored on macOS and RStudio, since such kind of filter is defined differently there.

...

Not used yet.

gui

The 'gui' object concerned by this dialog box.

See Also

svDialogs::dlg_open()

Examples

Run this code
library(svDialogstcltk) # Tcl/Tk dialog boxes are now used by default
if (FALSE) {
# Choose one R file
dlg_open(title = "Select one R file", filters = dlg_filters[c("R", "All"), ])$res
# Choose several files
dlg_open(multiple = TRUE)$res
}

Run the code above in your browser using DataLab