rstudioapi (version 0.10)

askForPassword: Ask the user for a password interactively

Description

Ask the user for a password interactively.

Usage

askForPassword(prompt)

Arguments

prompt

Single element character vector containing the prompt to be displayed

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

Run this code
# NOT RUN {
rstudioapi::askForPassword("Please enter your password")
# }

Run the code above in your browser using DataCamp Workspace