Skip to content
Eric Hare

2013 — 2024 · Co-author

discreteRV

An R package for teaching and manipulating discrete random variables — closer to the notation you'd write on a blackboard.

R

discreteRV lets you define a discrete random variable with nearly the same syntax you’d write in an undergraduate probability textbook — RV(outcomes, probs) — and then do conditional expectations, joint distributions, and transformations on it. The goal was to get R’s power without forcing students to learn the programming idioms first.

Published in the R Journal (Vol 7 Iss 1, 2015). CRAN-archived in 2024 after a dependency maintenance gap; code is still on GitHub and students still use it.