On 30 June 2012 at 11:39, Greg Snow wrote: | Look at the replicate function, it takes an expression (does not need | a function) and runs that expression the specified number of times. | Will that accomplish what you want without needing to worry about | substitute, quote, eval, etc.?
And also look at the existing benchmark packages 'rbenchmark' and 'microbenchmark': R> library(microbenchmark) R> x <- 5; microbenchmark( 1/x, x^-1 ) Unit: nanoseconds expr min lq median uq max 1 1/x 296 322.5 341 364.0 6298 2 x^-1 516 548.5 570 591.5 5422 R> Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com ______________________________________________ R-help@r-project.org mailing list 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.