fileBrowser {psichomics}R Documentation

Interactive folder selection using a native dialogue

Description

Interactive folder selection using a native dialogue

Usage

fileBrowser(default = NULL, caption = NULL, multiple = FALSE,
  directory = FALSE, system = Sys.info()["sysname"])

Arguments

default

Character: path to initial folder

caption

Character: caption on the selection dialogue

multiple

Boolean: allow to select multiple files?

directory

Boolean: allow to select directories instead of files?

system

Character: system name

Details

For macOS, it uses an Apple Script to display a folder selection dialogue. With default = NA, the initial folder selection is determined by default behaviour of the "choose folder" Apple Script command. Otherwise, paths are expanded with path.expand.

In Windows, it uses either 'utils::choose.files' or 'utils::choose.dir'.

Value

A length one character vector, character NA if 'Cancel' was selected.

Source

Original code by wleepang: https://github.com/wleepang/shiny-directory-input


[Package psichomics version 1.4.5 Index]