Skip to content

runexp

0.2.1

Softball Run Expectancy using Markov Chains and Simulation

0packages depend
2.7Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Annie SauerFirst published 2021-02-153 releasesCRAN page ↗

Implements two methods of estimating runs scored in a softball scenario: (1) theoretical expectation using discrete Markov chains and (2) empirical distribution using multinomial random simulation. Scores are based on player-specific input probabilities (out, single, double, triple, walk, and homerun). Optional inputs include probability of attempting a steal, probability of succeeding in an attempted steal, and an indicator of whether a player is "fast" (e.g. the player could stretch home). These probabilities may be calculated from common player statistics that are publicly available on team's webpages. Scores are evaluated based on a nine-player lineup and may be used to compare lineups, evaluate base scenarios, and compare the offensive potential of individual players. Manuscript forthcoming. See Bukiet & Harold (1997) doi:10.1287/opre.45.1.14 for implementation of discrete Markov chains.

Install

Health

CRAN checks
13OK
Slowest check: 1.1 min · r-oldrel-windows-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
3
Dependencies · direct
Check history
  • OK2026-07-04
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-07-01
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-15
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-03-14
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesNopkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
100%
References docs
29%

Downloads

2.7K
CRAN downloads in the past year
Rank #16,495 · ~7/day · ~223/mo
Daily download trend is not available in this view yet.
18930 days
69790 days
2.7K1 year
Compare downloads with other packages →
Also on83 r2u10 autocran54 c2d4u

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.6
Imports (3)
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Code Composition
R 2,189 (79%)Rd 571 (21%)
Code characteristics
Object systems
S31
Cyclomatic complexity
8.5 median / 38 max

Test coverage

Line coverage

Expression

Tests / Examples

Functions

14 4 exported

Complexity

11.9 avg / 38 max

Call network

14 nodes / 13 edges

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

Datasets

Bundled datasets · 2
NameClassRows × ColsAlso ships in
wku_probsspec_tbl_df/tbl_df/tbl/data.frame18 × 11
wku_statstbl_df/tbl/data.frame18 × 23

6 internal objects are bundled for the package's own use and not listed here.

People & History

People (2)
Maintainer (1)
Author, Maintainer
Authors (2)
Author, Maintainer
Package Timeline

3 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.2.1Latest
    2021-03-22 · current release · diff ↗
  • 0.2.0
    2021-03-01 · diff ↗
  • 0.1.0
    2021-02-15
  • R
    R 4.0.0 released · 2020-04-24

Package metadata

First published
2021-02-15
Total releases
3 / 5 yrs
License
LGPL
Minimum R
≥ 3.6
Bundled data
1.9 KB / 2 files
Download size
34 KB
Installed size
not tracked yet
With dependencies
not tracked yet
Appears in task views
Report a problem with this page →