Displays the tcltk package's read file dialog. Once the user enters or
selects a file name,
ReadData() will read and return the value stored
in the corresponding RDS data file. The dialog will initially display the
current working directory (see
ReadData uses the
readRDS() function, from R's base package, to read
R data. The data is stored in the RDS file as an unnamed object, so the user
must assign the return value to a named variable.
Throws an error if the selected file does not end in "RDS" (case-insensitive). Prints a message if the user cancels the dialog without selecting a file.
The R object stored in the RDS data file, or NA if the user cancels the dialog without selecting a file.
1 2 3 4
## Not run: my.data <- ReadData() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.