Re: [R] Multiple expressions in system.time()?

2003-07-25 Thread Prof Brian Ripley
On Thu, 24 Jul 2003, Dirk Eddelbuettel wrote: On Thu, Jul 24, 2003 at 07:10:27PM -0700, Robert Keefe wrote: # This I can do: system.time(x - rnorm(10)) [1] 0.07 0.00 0.13 0.00 0.00 # But this I can't: system.time(x - rnorm(10); new - sample(x, 10, replace=T)) Error:

[R] Multiple expressions in system.time()?

2003-07-24 Thread Robert Keefe
Hi All, Is it possible for system.time() to measure the time it takes for a machine to evaluate more than one R expression? For example, # This I can do: system.time(x - rnorm(10)) [1] 0.07 0.00 0.13 0.00 0.00 # But this I can't: system.time(x - rnorm(10); new - sample(x, 10,

Re: [R] Multiple expressions in system.time()?

2003-07-24 Thread Dirk Eddelbuettel
On Thu, Jul 24, 2003 at 07:10:27PM -0700, Robert Keefe wrote: # This I can do: system.time(x - rnorm(10)) [1] 0.07 0.00 0.13 0.00 0.00 # But this I can't: system.time(x - rnorm(10); new - sample(x, 10, replace=T)) Error: syntax error Just use curly braces: system.time({x -