On Mon, May 17, 2010 at 6:24 PM, Peter Ehlers <ehl...@ucalgary.ca> wrote:

> Try
>  system.time(y <- f(x))
>
> and see ?"=".
>
>  -Peter Ehlers

 Ah ha. That explains the curly brackets I saw in a posting with
system.time on stack overflow just now:

 system.time({y=f(x)})

 works as expected since the {} pair make a new code block. Also you
can then time more than one statement:

 system.time({y=f(x);z=g(y)})

 - gives the total time for f(x) and g(y).

Barry

______________________________________________
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.

Reply via email to