I would like to read an input given by User in R programming through message window.
For example, It should give a message "enter the number" in a pop up box along with option of entering a number in the message box itself. Then I would like to store that number in a variable.
Thanks for your help in advance..!
The svDialogs provides such solution.
library(svDialogs)
user.input <- dlgInput("Enter a number", Sys.info()["user"])$res
which gives a pop-up as
Also, user input is stores
> user.input
[1] "68"
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