Juan Telleria
2017-Dec-21 14:05 UTC
[Rd] Wish List: base::source() + Add Execution Time Argument
But by statement in the source file, I mean, for knowing during the execution how much time is taking, without having to wait till the end. 2017-12-21 13:06 GMT+01:00 I?aki ?car <i.ucar86 at gmail.com>:> 2017-12-21 12:46 GMT+01:00 Juan Telleria <jtelleriar at gmail.com>: > > Dear R Developers, > > > > Adding to source() base function a Timer which indicates the execution > time > > of the source code would be a very well welcome feature, and in my > opinion > > not difficult to implement as an additional funtion argument. > > > > The source(timing = TRUE) function shall execute internally the following > > code for each statement: > > > > old <- Sys.time() # get start time at the beginning of source() > > # source code > > # print elapsed time > > new <- Sys.time() - old # calculate difference > > print(new) # print in nice format > > system.time(source(...)) does what you want. > > I?aki >[[alternative HTML version deleted]]
Iñaki Úcar
2017-Dec-21 14:20 UTC
[Rd] Wish List: base::source() + Add Execution Time Argument
2017-12-21 15:05 GMT+01:00 Juan Telleria <jtelleriar at gmail.com>:> But by statement in the source file, I mean, for knowing during the > execution how much time is taking, without having to wait till the end.What's the ultimate purpose? Are you looking for a profiler (there are some of them on CRAN) or some kind of progress bar (something like the 'progress' package would be useful)? I?aki
Juan Telleria
2017-Dec-21 15:49 UTC
[Rd] Wish List: base::source() + Add Execution Time Argument
I did not know "progress" package existed, thank you I?aki. However, something like that would be nice to have by default in source(), just something to add to R's "wish list", so that everybody can benefit from it without extra-packages, as most of us I suppose we will spend all day simply doing Ctrl + Run :) Thank you, Juan 2017-12-21 15:20 GMT+01:00 I?aki ?car <i.ucar86 at gmail.com>:> 2017-12-21 15:05 GMT+01:00 Juan Telleria <jtelleriar at gmail.com>: > > But by statement in the source file, I mean, for knowing during the > > execution how much time is taking, without having to wait till the end. > > What's the ultimate purpose? Are you looking for a profiler (there are > some of them on CRAN) or some kind of progress bar (something like the > 'progress' package would be useful)? > > I?aki >[[alternative HTML version deleted]]