i have an idea to pause loop at some iteration and ask "user" for some answer.
for example
some_value = 0
some_criteria = 50
for(i in 1:100)
{
some_value = some_value + i
if(some_value > some_criteria)
{
#Here i need to inform the user that some_value reached some_criteria
#I also need to ask the user whether s/he wants to continue operations until the loop ends
#or even set new criteria
}
}
Again, I want to pause loop, and ask user if he would like to continue like: "Press Y/N"