[R] timing a function

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Mon May 17 21:06:44 CEST 2010

On Mon, May 17, 2010 at 6:24 PM, Peter Ehlers <ehlers at 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:


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


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


More information about the R-help mailing list