[R] Calculation of time for 5000 simulation study

Ulrik Stervbo ulrik.stervbo at gmail.com
Sun Jan 10 16:07:19 CET 2016


Hi Muhammad,

is the system.time() function what you are looking for?

You can use it like this:

system.time(for(i in 1:100) mad(runif(1000)))

or

f1 <- function(){
for(i in 1:100) mad(runif(1000))
}

system.time(f1)

HTH
Ulrik

On Sun, 10 Jan 2016 at 15:58 Muhammad Kashif <mkashif at uaf.edu.pk> wrote:

> Dear
>
> Is there any function which calculate time for one simulation  when we
> use  " asim=2000" under any simulation study. I run one simulation code on
> R and i have core i 5 laptop. Each simulation take about 30 -40 minutes.
>
> Is there any function which calculate time of each output.
>
>
> thanks
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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]]



More information about the R-help mailing list