Dear useRs
How can I stop a loop without printing the 'error' message (givin by stop()
, for instance) ?
Best regards,
--
Eric B Ferreira
Departamento de Ciências Exatas
Universidade Federal de Lavras
Minas Gerais - Brasil
[[alternative HTML version deleted]]
On 7/4/2008 8:04 AM, Eric Ferreira wrote:
Dear useRs
How can I stop a loop without printing the 'error' message (givin by stop()
, for instance) ?
Just put in a break statement, e.g.
for (i in 1:10) {
+ print(i)
+ if (i 5) break
+ }
[1] 1
[1] 2
[1] 3
[1] 4
[1] 5
[1] 6
Duncan
2 matches
Mail list logo