Ask the user for a password interactively.

askForPassword(prompt)

Arguments

prompt

Single element character vector containing the prompt to be displayed

Note

The askForPassword function was added in version 0.99.853 of RStudio.

Details

RStudio also sets the global askpass option to the rstudioapi::askForPassword function so that it can be invoked in a front-end independent manner.

Examples

if (FALSE) { rstudioapi::askForPassword("Please enter your password") }