[R] automate "press enter"

Adams, Jean jvadams at usgs.gov
Fri Mar 13 04:30:16 CET 2015


This did the trick for my application,


for details.


On Thu, Mar 12, 2015 at 10:25 AM, Doran, Harold <HDoran at air.org> wrote:

> I’m dealing with an issue that is seemingly simple, and I’m sure there is
> an obvious solution. I’m 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 doesn’t have to manually hit
> enter?
> Harold
>         [[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]

More information about the R-help mailing list