[R] interacting with the user: programming r in order to ask questions to the user

Jacopo mkultrateam at yahoo.it
Mon Oct 7 17:23:17 CEST 2013

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

More information about the R-help mailing list