repromonkey: Repro Monkey

Description Usage Arguments Functions Warning Add to .Rprofile

Description

Summon the repro monkey to lurk in your workspace. It always asks for consent first. The easiest way is to add repromonkey to your .Rprofile so that you'll always be on your toes when working.

Usage

1
2
3
4
5
6
repromonkey(wait = NULL, delay_self = 5, consented = NULL,
  idle_timeout = 900)

install_repromonkey()

monkey_hint(reveal = FALSE)

Arguments

wait

Set a deterministic wait time in seconds. If NULL, a random wait time is selected from an exponential distribution with average wait time of 2 hours (but truncated at 3 hours). So by default, the repro monkey will strike within three hours.

delay_self

A wait period of a few seconds to allow startup scripts to complete before requesting consent.

consented

Have you consented? If TRUE, no consent will be requested prior to summoning the repromonkey. Defaults to FALSE or the last consent response in the current session.

idle_timeout

How often should repromonkey poll your R session history to make sure that you're actively working? The default is 15 minutes. If no activity is seen between each session poll, the repromonkey will get bored and will ignore you. This means you won't come back to your work to find that repromonkey messed it up. It doesn't turn off repromonkey, so when you're back at work the monkey may come back.

reveal

If FALSE, repromonkey gives a vague hint about the next arrival or last action. If TRUE, repromonkey gives accurate details about what just or will happen.

Functions

Warning

This is a fun tool to help bolster your confidence as you follow and hone your reproducibility best practices skills. But it does come at the risk of data loss and frustration (just like the real world). Your consent is requested at each R session restart.

Add to .Rprofile

To summon the repro monkey automatically, edit your .Rprofile and add the following lines. (If you use the library usethis, you can can call usethis::edit_r_profile().)

1
2
3
if (interactive() && requireNamespace("repromonkey", quietly = TRUE)) {
  repromonkey::repromonkey()
}

If you want to waive the interactive consent, add consented = TRUE to the call to repromonkey().

Note that you can also choose to add repromonkey to specific projects using project-specific .Rprofile files.


gadenbuie/repromonkey documentation built on May 16, 2019, 9:17 a.m.