I am using some commands which result in R command queries (from a server) that wait for keystrokes in the R-Studio Console (e.g.: Enter response: "), and I need to return strings as answers, one at a time. Thus, I need to post a response, wait about 10 seconds for the query to process and for the next query to post, and so on, and then let my code resume.
My guess is that this would be similar to posting an "a" to update all when you are installing a package -- or something like this.
Another issue is that I have the responses in lines inside an if statement, based on data sent to the online archive query, but the code inside the if statement just gets added to the cumulative command string with multiple "+" symbols on the left column. How can I enforce R to execute each line, and not jump ahead. This would be similar to c# and VB.NET for which non-threaded code doesn't get ahead of itself.
I believe I need to send keystrokes, like the the VB.NET's key command.
FYI - Print("Answer") does not work since the response is "Print("Answer")"