Learn R Programming

tidyft (version 0.9.20)

sys_time_print: Convenient print of time taken

Description

Convenient printing of time elapsed. A wrapper of data.table::timetaken, but showing the results more directly.

Usage

sys_time_print(expr)

Value

A character vector of the form HH:MM:SS, or SS.MMMsec if under 60 seconds. See examples.

Arguments

expr

Valid R expression to be timed.

See Also

Examples

Run this code

sys_time_print(Sys.sleep(1))

a = as.data.table(iris)
sys_time_print({
  res = a %>%
    mutate(one = 1)
})
res

Run the code above in your browser using DataLab