[R] system.time behavior using source
Gabor Grothendieck
ggrothendieck at gmail.com
Mon Sep 17 16:49:22 CEST 2007
Try this:
source("myfile.R", echo = TRUE)
On 9/17/07, Leeds, Mark (IED) <Mark.Leeds at morganstanley.com> 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 also works in that
> the system.time info is the .Rout file. Is there something I
> can do so that this line also works when I source it ? Thanks. My
> information is below.
>
> system.time(for(i in 1:100) mad(runif(1000)))
>
>
>
> My information :
>
> R version 2.5.0 (2007-04-23)
> i686-pc-linux-gnu
>
> locale:
> C
>
> attached base packages:
> [1] "datasets" "utils" "stats" "graphics" "grDevices"
> "methods" "base"
>
> other attached packages:
> lattice filehash reshape zoo chron MASS
> "0.15-8" "1.0" "0.7.4" "1.3-1" "2.3-11" "7.2-33"
> --------------------------------------------------------
>
> This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list