Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

slow_sum

Slowly Calculate Sum of Elements


Description

Slowly Calculate Sum of Elements

Usage

slow_sum(
  x,
  delay = getOption("progressr.demo.delay", 1),
  stdout = FALSE,
  message = TRUE
)

Arguments

x

Numeric vector to sum

delay

Delay in seconds after each addition.

stdout

If TRUE, then a text is outputted to the standard output per element.

message

If TRUE, then a message is outputted per element.

Value

The sum of all elements in x.

Progress updates

This function signals progression conditions as it progresses.


progressr

An Inclusive, Unifying API for Progress Updates

v0.10.0
GPL (>= 3)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.