file.choose {Java}R Documentation

Java Graphical Dialog for selecting a file.

Description

Allows the user to select a file by browsing her directories visually using the JFileChooser in the Java Swing package.

Usage

file.choose(dir="")

Arguments

dir The directory to use as the starting point of the selection and browsing in the JFileChooser. See the Swing documentation for how this is handledr.

Details

This creates a dialog window and waits for the user to click on the Open or Cancel button. The user can navigate directories, create new folders, provide new filters, etc. before comitting to a selection or cancellation. In the meantime, the R process blocks, waiting for the user's action.

Value

The fully qualified name of the selected file or NULL if the dialog was cancelled by the user.

Note

This requires the Java Virtual Machine (version 2 or higher)

Author(s)

Duncan Temple Lang

References

Swing, Java, http://www.omegahat.org

See Also

.Java, .JavaConstructor

Examples

  file.choose()
  file.choose("~")