Hi!

What about use of %%, so you print every nth iteration on screen, you can
afcoures calculate how many % of iterations has already passed etc.

Some dummy example:

i <- 0
x <- 1:1000000
for (i in x) {
    if (i %% 100 == 0) {
        print(i)
    }
}

--
Lep pozdrav / With regards,
    Gregor GORJANC

------------------------------------------------------------------------
University of Ljubljana
Biotechnical Faculty       URI: http://www.bfro.uni-lj.si/MR/ggorjan
Zootechnical Department    email: gregor.gorjanc <at> bfro.uni-lj.si
Groblje 3                  tel: +386 (0)1 72 17 861
SI-1230 Domzale            fax: +386 (0)1 72 17 888
Slovenia
------------------------------------------------------------------------


Date: Fri, 25 Feb 2005 01:51:30 +0100
From: "Carsten Steinhoff" <[EMAIL PROTECTED]>
Subject: [R] Simulation Progress
To: <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain;       charset="us-ascii"

Hi,

I've made a function that executes a monte-carlo simulation.
It always needs a lot of time until e.g. 1Mio simulation steps are done.
So I would like to know, how many percent of the work is already done.

In an Excel/VBA Solution I could easily implement a status bar or status
window.

How could an R-Solution look like?

Carsten

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to