Re: [R] system.time behavior using source

2007-09-17 Thread Prof Brian Ripley
You need to print the result of an expression if used from source(). Autoprinting only occurs at the top level. E.g. % cat > systest.R print(system.time(for(i in 1:100) mad(runif(1000 > source("systest.R") user system elapsed 0.140.000.20 On Mon, 17 Sep 2007, Leeds, Mark (IE

Re: [R] system.time behavior using source

2007-09-17 Thread Gabor Grothendieck
Try this: source("myfile.R", echo = TRUE) On 9/17/07, Leeds, Mark (IED) <[EMAIL PROTECTED]> wrote: > If I type the line below at my Rprompt, it works fine. But, if I put the > same line in a file called systest.R and then source that file at > the prompt, nothing happens. IF I use R CMD BATCH, it

[R] system.time behavior using source

2007-09-17 Thread Leeds, Mark (IED)
If I type the line below at my Rprompt, it works fine. But, if I put the same line in a file called systest.R and then source that file at the prompt, nothing happens. IF I use R CMD BATCH, it also works in that the system.time info is the .Rout file. Is there something I can do so that this line a