The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

File Dialogs

Using the rstudioapi package, you can request input from the user with various dialogs.

The selectFile() and selectDirectory() APIs allow you to request the name of an existing or non-existing path on the system.

# request the path to an existing .csv file on disk
path <- rstudioapi::selectFile(caption = "Select CSV File",
                               filter = "CSV Files (*.csv)",
                               existing = TRUE)

# now, you could read the data using e.g. 'readr::read_csv()'
data <- readr::read_csv(path)

# request a file path (e.g. where you would like to save a new file)
target <- rstudioapi::selectFile(caption = "Save File",
                                 label = "Save",
                                 existing = FALSE)

# save data to the path provided by the user
saveRDS(data, file = target)

Use rstudioapi::askForPassword() to request a password, or other credentials, from a user.

token <- rstudioapi::askForPassword(
  prompt = "Please provide your GitHub access token."
)

Use rstudioapi::showDialog() to display an informative dialog to the user. This dialog is used to report some kind of status or information to the user; it does not request any input.

rstudioapi::showDialog(title = "Hello, world!",
                       message = "You're <b>awesome!</b>",
                       url = "http://www.example.com")

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.