decisions: Typed Decisions from Decision Models

Sends texts and images to decision models: hosted or local models that return a probability for each allowed answer to a typed question (true or false, a choice, or an ordered score). Supports the web services of 'TypeSafe' <https://docs.typesafe.ai/introduction>, 'OpenAI' <https://platform.openai.com>, 'OpenRouter' <https://openrouter.ai> and 'Microsoft Foundry' <https://ai.azure.com>, which need an API (application programming interface) key and can charge for each call, and any local or hosted server that uses the 'SystemOne' request format. Returns one row for each input in the 'tidymodels' style, saves and scores a complete decision setup, and applies a calibrator fitted with 'probably'. Includes injury reports from the Severe Injury Reports of the U.S. Occupational Safety and Health Administration <https://www.osha.gov/severe-injury-reports>, food recall reports of the U.S. Food and Drug Administration <https://open.fda.gov/apis/food/enforcement/>, and simulated textile images made with 'spc4sts', Bui and Apley (2021) <doi:10.1080/00224065.2019.1707730>.

Version: 0.1.0
Depends: R (≥ 4.3.0)
Imports: cli (≥ 3.6.0), httr2 (≥ 1.2.0), jsonlite (≥ 1.8.5), purrr (≥ 1.0.0), rlang (≥ 1.3.0), S7 (≥ 0.2.0), stringi, tibble
Suggests: dplyr, knitr, magick, mgcv, probably, rmarkdown, rsample, testthat (≥ 3.0.0), withr, yardstick
Published: 2026-11-08
DOI: 10.32614/CRAN.package.decisions (may not be active yet)
Author: Fadel M. Megahed ORCID iD [aut, cre], Ying-Ju Chen ORCID iD [aut]
Maintainer: Fadel M. Megahed <fmegahed at miamioh.edu>
BugReports: https://github.com/fmegahed/decisions/issues
License: MIT + file LICENSE
URL: https://github.com/fmegahed/decisions, https://fmegahed.github.io/decisions/
NeedsCompilation: no
Language: en-US
Materials: README, NEWS
CRAN checks: decisions results

Documentation:

Reference manual: decisions.html , decisions.pdf
Vignettes: Choosing a model (source, R code)
Getting started with text (source, R code)
Grading short answers with a rubric (source, R code)
Images (source, R code)
Case study: industrial image inspection (source, R code)
Open models on your own computer (source, R code)

Downloads:

Package source: decisions_0.1.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): not available

Linking:

Please use the canonical form https://CRAN.R-project.org/package=decisions to link to this page.