| Start |
|---|
| User input in R Sometimes it can be interesting to have a cross-talk between the user and the program, one example being the swirl (opens new window) package that had been designed to teach R in R. One can ask for user input using the The user can then give any answer, such as a number, a character, vectors, and scanning the result is here to make sure that the user has given a proper answer. For example: However, it is to be noted that this code be stuck in a never-ending loop, as user input is saved as a character. We have to coerce it to a number, using Syntax |
Read Article
https://develop.horje.com/learn/1434/reference