Jacopo
2013-Oct-07 15:23 UTC
[R] interacting with the user: programming r in order to ask questions to the user
hello everyone. I am trying to create a model in which R asks some questions to the user, and the user answer to them. I have already create two vector; In one there are number ex 1,2,3,4,5,6,7,8,9,10 and in the other there are "word" ex one, two, three, four. I would like to create a script that automatically ask this questions, for instance "1 ? " and the user answer "one" and so on. If the user make a mistake R remembers the mistake and ask the question again after n questions. I think I should use while command, if , and readline but I am not sure about that. Help is very appreciated !! Thank you in advance