Learn R Programming

player (version 0.1.0)

look_busy: Look like you're working hard when you're hardly working

Description

Look like you're working hard when you're hardly working

Usage

look_busy(
  minutes = if (rlang::is_interactive()) Inf else 0,
  speed = 1,
  lambda = 3,
  background_job = FALSE,
  end = invisible(NULL)
)

Value

end if minutes is finite.

Arguments

minutes

How long to keep this up for. Defaults to Inf, which runs forever.

speed

How fast to produce output. The default value, 1, takes between 0.1 and 0.5 seconds to produce a calculation and between 1 and 5 seconds to produce a status update.

lambda

Input to a poisson distribution determining how many calculations to perform between each message. Defaults to 3.

background_job

Whether to produce output in in a background job (if TRUE) or the console (if FALSE). Defaults to FALSE. Running in a background process requires the job package.

end

Code to run after minutes. If minutes is Inf, end is never run.

Author

Alexander Rossell Hayes alexander@rossellhayes.com (ORCID)

With status messages contributed by:

Examples

Run this code
look_busy()

Run the code above in your browser using DataLab