Learn R Programming

oeli (version 0.5.2)

do.call_timed: Measure computation time

Description

This function measures the computation time of a do.call call.

Usage

do.call_timed(what, args, units = "secs")

Value

A list of the two elements "result" (the results of the do.call

call) and "time" (the computation time).

Arguments

what

Passed to do.call.

args

Passed to do.call.

units

Passed to difftime.

Details

This function is a wrapper for do.call.

Examples

Run this code
if (FALSE) {
what <- function(s) {
  Sys.sleep(s)
  return(s)
}
args <- list(s = 1)
do.call_timed(what = what, args = args)
}

Run the code above in your browser using DataLab