Learn R Programming

tada (version 2024.1.0)

pkg_roulette: package roulette

Description

Runs a packages roulette

Usage

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

Value

the last package, invisibly

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().

Examples

Run this code
pkg_roulette(
  time = 2,
  pkgs = sample(c("dplyr", "ggplot2", "data.table", "Rcpp", "arrow", "duckdb"))
)

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

Run the code above in your browser using DataLab