From jtelleriar at gmail.com  Thu Dec 21 15:05:36 2017
From: jtelleriar at gmail.com (Juan Telleria)
Date: Thu, 21 Dec 2017 15:05:36 +0100
Subject: [Rd] Wish List: base::source() + Add Execution Time Argument
In-Reply-To: <CALEXWq190cRMDoS9MXkmJdzqDDd=T4rP99Jvi5MGAJ5ZrcGrHA@mail.gmail.com>
References: <CANNd7=mvnfnuYHDfxog-bSLkKnG_AiMcmTj7p7GOj_hh_D5VYw@mail.gmail.com>
 <CALEXWq190cRMDoS9MXkmJdzqDDd=T4rP99Jvi5MGAJ5ZrcGrHA@mail.gmail.com>
Message-ID: <CANNd7=nYOPrZq9LTCee8CqAX+LZE2wCa-zi-J0EBjs8UZrXjeA@mail.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.

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]]



[Rd] Wish List: base::source() + Add Execution Time Argument
Juan Telleria