Learn R Programming

Laurae (version 0.0.0.9001)

timer_func: Get Function Time in Milliseconds

Description

This function returns the time needed for a function to run in milliseconds.

Usage

timer_func(expr)

Arguments

expr
Type: any expression. An expression to evalutate (the expression you want to benchmark).

Value

The time needed for a function to run in milliseconds.

Examples

Run this code
library(R.utils)
timer_func({for (i in 1:100) {cat(i, " ")}})

Run the code above in your browser using DataLab