Storing tic toc values in R -
i'm looking way store running times in variable in r. in matlab 1 can along lines:
tic;
...
x=toc;
and running time stored in variable x. have tried doing same thing tic() toc() function in r coming matlab-package without success. furthermore can't see how can done using system.time() function of r neither. here appreciated.
use built-in system.time function:
tm1 <- system.time( { #your code here }) or, alternatively benchmark function rbenchmark package:
tm2 <- benchmark( { #your code here }, replications=1)
Comments
Post a Comment