79788164

Date: 2025-10-11 18:15:07
Score: 1
Natty:
Report link

Late to the party, but I made a package for this purpose, it's out on CRAN: pipetime.
Each time_pipe() reports the cumulative time since the pipeline started.

install.packages("pipetime")
library(pipetime)

rnorm(1E7) %>% mean %>% time_pipe("mean of 10M rnorm")

data.frame(x = 1:3) |>
mutate(y = {Sys.sleep(0.5); x*2 }) |>
time_pipe("calc 1") |>
mutate(z = {Sys.sleep(0.5); x/2 }) |>
time_pipe("total pipeline")
Reasons:
  • Contains signature (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: CyG