Is it possible to make a pop-up box appear to the user to input a value in R? I've put together a pair of lines that perform the equivalent function using readline, but is it possible to make the prompt appear somewhere other than the console? Thank you!
The svDialogs package provides one solution.
Running the following, for example...
library(svDialogs)
## Ask something...
user <- dlgInput("Who are you?", Sys.info()["user"])$res
... gets me the following pop-up input box:
(Whatever value is in the box when you click 'OK' is, as you'd expect, assigned to the symbol user
.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With