li dongfeng wrote:
> Hi there,
> 
>   I have just found that the ``attach'' function
> can get you into trouble when called many times.
[..]
>   Below is a demonstration of this performance loss,
> you will see a linear growth in CPU time usage.
> Adding a ``detach()'' call at the end of ``f''
> will get rid of this problem.

Yes, this behaviour is well known (to me using attach for differential
equation models long ago). Detaching ist absolutely required. As an
alternative one can use the with() function.

Thomas P.

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

Reply via email to