[R] automate "press enter"
Doran, Harold
HDoran at air.org
Thu Mar 12 16:25:28 CET 2015
Im dealing with an issue that is seemingly simple, and Im sure there is an obvious solution. Im writing a wrapper function that calls functions from another package (twitteR).
However, the function I happen to be using in that package prompts the user the user to enter a 1 or a 2 in the workspace before the user can proceed. The actual process looks like this:
> setup_twitter_oauth(APIkey,APIsecret, Accesstoken, Accesssecret)
Use a local file to cache OAuth access credentials between R sessions?
1: Yes
2: No
I know I want the value 2 to be entered, but I cannot figure out how to automate it without a human actually entering 2 and hitting enter when prompted.
Is it possible to automate this so the user doesnt have to manually hit enter?
Harold
[[alternative HTML version deleted]]
More information about the R-help
mailing list