Skip to contents

Runs a packages roulette

Usage

pkg_roulette(
  time = 4,
  n = 100,
  pkgs,
  cols = sample(colors(), n, replace = TRUE)
)

Arguments

time

How long in seconds the roulette runs. It will increasingly speed up.

n

number of packages in the roulette, packages are selected with utils::available.packages(). Ignored if pkgs= is given.

pkgs

Packages to show in the roulette.

cols

colors. The default is to pick n colors from the built-in grDevices::colors().

Value

the last package, invisibly

Examples

pkg_roulette(
  time = 2,
  pkgs = sample(c("dplyr", "ggplot2", "data.table", "Rcpp", "arrow", "duckdb"))
)
#> 

arrow
         
Rcpp
       
data.table
                   
dplyr
         
ggplot2
             
duckdb

if (FALSE) {
 # roulette of 100 available CRAN packages
 pkg_roulette(time = 4, n = 100)
}