[R] Simulation Progress

Gorjanc Gregor Gregor.Gorjanc at bfro.uni-lj.si
Fri Feb 25 15:06:36 CET 2005


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" <carsten.steinhoff at gmx.de>
Subject: [R] Simulation Progress
To: <r-help at stat.math.ethz.ch>
Message-ID: <200502250051.j1P0pbVb010092 at hypatia.math.ethz.ch>
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




More information about the R-help mailing list