Obtaining the time to execute a R command

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Obtaining the time to execute a R command

reichmaj
R- Help

 

Is there a command or way to obtain the time it took R to execute a command?

 

 

Sincerely

 

Jeff Reichman

(314) 457-1966

 


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Obtaining the time to execute a R command

Eric Berger
Hi Jeff,
You might want to check out the microbenchmark() function in the
microbenchmark package.

install.packages("microbenchmark")
library(microbenchmark)
?microbenchmark

HTH,
Eric


On Wed, Nov 20, 2019 at 5:45 PM Jeff Reichman <[hidden email]>
wrote:

> R- Help
>
>
>
> Is there a command or way to obtain the time it took R to execute a
> command?
>
>
>
>
>
> Sincerely
>
>
>
> Jeff Reichman
>
> (314) 457-1966
>
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Obtaining the time to execute a R command

Rui Barradas
In reply to this post by reichmaj
Hello,

There is

system.time {base}
CPU Time Used

Description

Return CPU (and other) times that expr used.


There are also packages microbenchmark or bench.


Hope this helps,

Rui Barradas

Às 15:44 de 20/11/19, Jeff Reichman escreveu:

> R- Help
>
>  
>
> Is there a command or way to obtain the time it took R to execute a command?
>
>  
>
>  
>
> Sincerely
>
>  
>
> Jeff Reichman
>
> (314) 457-1966
>
>  
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.