LLMR: Interface for Large Language Model APIs in R

Provides a unified interface to large language models across multiple providers. Supports text generation, tidy data workflows, structured output with optional JSON Schema validation, XML-like tag extraction, and embeddings. Includes chat sessions, consistent error handling, and parallel batch tools.

Version: 0.6.4
Depends: R (≥ 4.1.0)
Imports: httr2, purrr, dplyr, tidyr, rlang, memoise, future, future.apply, tibble, base64enc, mime, glue (≥ 1.6.0), cli (≥ 3.6.0), jsonlite, vctrs
Suggests: testthat (≥ 3.0.0), roxygen2 (≥ 7.1.2), httptest2, progressr, knitr, rmarkdown, ggplot2, R.rsp, jsonvalidate
Published: 2026-05-21
DOI: 10.32614/CRAN.package.LLMR
Author: Ali Sanaei [aut, cre]
Maintainer: Ali Sanaei <sanaei at uchicago.edu>
BugReports: https://github.com/asanaei/LLMR/issues
License: MIT + file LICENSE
URL: https://github.com/asanaei/LLMR, https://asanaei.github.io/LLMR/
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: LLMR results

Documentation:

Reference manual: LLMR.html , LLMR.pdf
Vignettes: JSON output vs. schema-validated output in LLMR (source, R code)
Simple chat with LLMR (source, R code)
Small experiment with LLMR (source, R code)
Presidential Speech Analysis with Embeddings (source, R code)
Tidy pipelines and structured output (source, R code)

Downloads:

Package source: LLMR_0.6.4.tar.gz
Windows binaries: r-devel: LLMR_0.6.4.zip, r-release: LLMR_0.6.3.zip, r-oldrel: LLMR_0.6.3.zip
macOS binaries: r-release (arm64): LLMR_0.6.4.tgz, r-oldrel (arm64): LLMR_0.6.4.tgz, r-release (x86_64): LLMR_0.6.3.tgz, r-oldrel (x86_64): LLMR_0.6.3.tgz
Old sources: LLMR archive

Linking:

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

mirror server hosted at Truenetwork, Russian Federation.