On Aug 13, 2010, at 6:57 PM, chantalm wrote:
So I have a for loop
for (i in 1 : 5) {
print(i)
}
and I want it to print 1, 2, 3, 4, 5 sequentially for each loop
iteration.
Instead, it waits for the whole loop to finish and then prints. It's
strange
because my R console seems to have two modes of execution. One where
it will
iterate for each loop and print the message (and where I can easily
abort an
R program with the escape key), and another mode where it doesn't
print for
each loop iteration/just keeps executing even if I press escape key.
I can't
figure out how to enable the first way of execution! Can someone
shed some
light on this matter?
This depends (if I remember correctly) on OS specifics which you have
not provided. Aren't they teaching you to read the manuals (aka
Posting Guide) at U-dub these days?
(perhaps search on :
??"flush console" # ( again, IIRC)
--
David Winsemius, MD (UW '87)
West Hartford, CT
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.