Hi Eitke, Hi  Wojciech,

I did some further testing and I don't experience this bug anymore. (at least on W2k). I will be testing it tomorrow on an XP machine, too. [but I do not have currently access to a unix machine]

Writing '=RSIMPLENUM("rnorm(1)")' inside Calc seems to be working properly on W2k with R2.5.0.

Wojciech, could you please try:
=RSIMPLENUM("rnorm(1)")
=RSIMPLENUM("rnorm(2)[[1]]")
=RSIMPLENUM("rnorm(3)[[1]]")
=RSIMPLENUM("rnorm(4)[[1]]")

Do they still yield the same number? [They do yield different numbers on my machine!]

What R version do you use? I doubt that this is an R issue.

Sincerely,

Leonard


Eike Rathke wrote:
Hi Leonard,

On Monday, 2007-06-04 11:38:11 +0200, Leonard Mada wrote:

I believe this is more a Calc issue. IF I understad correctly, Calc
tries to cache information and already calculated values. So, IF Calc
encounters the same formula a 2nd time, then it possibly never runs
the funciton again, BUT rather outputs the value from the Cache.

As Niklas already wrote last week in a reply to Wojciech, that is not
the case. If the function is called from different cells, no caching is
done by Calc. Also several calls within one cell formula are evaluated
independently. Only the formula result is cached for each cell
separately and reused if there was no need to flag the cell as dirty,
for example when cells changed that are referenced in the formula.

Wojciech, are you sure your code doesn't "cache" the R result, for
example by accessing it through a static variable before passing it to
Calc?

  Eike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to