choose_files: Choose files interactively

Description Usage Arguments Value Note Examples

View source: R/choose.R

Description

Choose one or more files or a directory interactively using a pop-up dialog.

Usage

1
2
3
choose_dir(default = "", sep = c("/", "\\"))

choose_files(default = "", multi = FALSE, sep = c("/", "\\"))

Arguments

default

The default file to be selected. See the Details section of choose.files for how to specify. Only on Windows.

sep

String separator between directory levels in the output.

multi

Logical value indicating if multiple files can be selected. Only on Windows.

Value

A character vector of standardized file paths that were chosen.

Note

choose_files uses choose.files under Windows and file.choose under other platforms.

Examples

1
2
3
4
5
6
7
8
if(interactive())
{
  choose_files()
  if(assertive.reflection::is_windows())
  {
    choose_dir()
  }
}

richierocks/pathological documentation built on May 27, 2019, 8:47 a.m.