New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: provide an unmasked-input option #13
Comments
I believe you can do this: userInput<-function(question) {
cat(question)
readLines(stdin(), n=1)
} |
If I do 'Rscript toy.R' from my command line, where 'toy.R' is
then the script runs, but does not give me any opportunity to enter input. |
Weird, it works for me. What OS are you using? Based on notes in userInput<-function(question) {
cat(question)
readLines(file("stdin"), n=1)
} |
You are right! I'm on OSX 10.12.6. |
wrathematics
pushed a commit
that referenced
this issue
Mar 17, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
getPass
provides the only way I know to have an R script that is run from the command line prompt for user input. If you're willing to let people abuse your package for unintended use-cases, it would be very helpful if you could add an argument to allow intentional unmasking of input. For example: https://stackoverflow.com/questions/45932404/r-script-with-user-input-from-command-line/48405624#48405624The text was updated successfully, but these errors were encountered: