cmdchoose.files {rChoiceDialogs}R Documentation

Choose a list of files interactively using the command line

Description

Allows to choose files or directories using the using the command line based interaction providing the same functionality as GUI counterparts without using any graphical framework.

Usage

  cmdchoose.files(default = getwd(),
    caption = "Select files", multi = TRUE,
    dir.only = FALSE, filters = getDefaultFilters(),
    index = nrow(filters))

Arguments

default

Which filename or directory to show initially. Default is current work directory.

caption

The caption on the file selection dialog

multi

Whether to allow multiple files to be selected

dir.only

If TRUE (default is FALSE) works as directory chooser.

filters

A matrix of filename filters. If NULL, all files are shown. Default is filters=getDefaultFilters().

index

Which row of filters to use by default.

Value

A character vector giving zero or more file paths. If user cancels operation, character(0) is returned.

Note

cmdchoose.files() is called internally by rchoose.files() if neither Java nor TclTk are available Calling cmdchoose.files() directly forces the package to use command line interaction regardless of system capabilities and therefore may fail. Use the direct call to cmdchoose.files() only if it seems beneficial to bypass the rchoose.files() decision logic.

Author(s)

Alex Lisovich, Roger Day

See Also

getDefaultFilters, rchoose.files, canUseJavaModal

Examples

## Not run: 
cmdchoose.files();

## End(Not run)

[Package rChoiceDialogs version 1.0.6.1 Index]