Язык программирования R/Управляющие структуры: различия между версиями

Содержимое удалено Содержимое добавлено
Циклы с предусловием ("while")
Циклы, обновление данных
Строка 29:
* циклы "for";
* циклы с предусловием ("while");
* "бесконечные" циклы с постусловием ("repeat");
 
=== Циклы "for" ===
Строка 66:
1.009195
</pre>
 
=== "Бесконечные" циклы ("repeat") ===
One should be careful with this kind of loops since if the breaking rules is misspecified the loop will never end.
In the two examples below the standard normal distribution is drawn in as long as the value is lower than 1. The cat() function is used to display the present value on screen.