Last data update: 2014.03.03

R: A select file to save dialog box
dlgSaveR Documentation

A select file to save dialog box

Description

Allows to easily select one filename to save data.

Usage

dlgSave(default, title, filters = dlgFilters["All", ], ..., gui = .GUI)

## These should not be called directly
## S3 method for class 'gui'
dlgSave(default, title, filters = dlgFilters["All", ], ..., gui = .GUI)
## S3 method for class 'textCLI'
dlgSave(default, title, filters = dlgFilters["All", ], ..., gui = .GUI)
## S3 method for class 'nativeGUI'
dlgSave(default, title, filters = dlgFilters["All", ], ..., gui = .GUI)

Arguments

default

the default file to start with (use /dir/* or /dir/*.* to start in a given directory, but without predefined name).

title

a title to display on top of the dialog box.

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 dlgFilters for examples. This is currently ignored on Mac OS X, since such kind of filter is defined differently there.

...

pass further arguments to methods.

gui

the 'gui' object concerned by this dialog box.

Value

The modified 'gui' object is returned invisibly. The choosen file, or an empty string (if the cancel button was clicked or confirmation was cancelled) is placed in gui$res (see example). For existing files, confirmation is always asked!

Author(s)

Philippe Grosjean (phgrosjean@sciviews.org)

See Also

dlgSave, dlgFilters, dlgDir

Examples

## Choose one R filename to save some R script into it
dlgSave(title = "Save R script to", filters = dlgFilters[c("R", "All"), ])$res

Results