Skip to content

llmimpute

0.1.0Package record

Missing Data Imputation via Language Models and Statistics

0packages depend
1.1Kdownloads / year
62.9%test coverage
13/13flavors OK

Overview

About

Provides missing data imputation through two complementary engines: a large language model engine that communicates with the 'Anthropic' 'Claude' application programming interface for context-aware semantic imputation, and a fully self-contained offline engine implementing nineteen statistical and machine learning algorithms entirely in base R with no additional package dependencies. Offline methods include mean, median, mode, last observation carried forward, next observation carried backward, hot-deck, predictive mean matching, k-nearest neighbours, ordinary least-squares regression, Lasso with coordinate descent, Ridge with closed-form solution, Bayesian Ridge regression with evidence approximation following MacKay (1992), support vector regression with a radial basis function kernel, classification and regression trees, random forests, gradient boosting, iterative random forest imputation, principal component analysis imputation via iterative singular value decomposition, and nuclear-norm minimisation via singular value thresholding. When no API key is available the package automatically falls back to the offline engine, ensuring full operation in environments without internet access. Every imputed value is accompanied by a confidence score and a plain-language reasoning string, producing reproducible audit trails. The automatic method selector chooses the best algorithm per column based on data type, skewness, missingness rate, and inter-column correlations.

Changes in 0.1.0

Initial CRAN release

New features

  • lmi_impute() — unified imputation entry point. Automatically selects between the LLM engine (Anthropic Claude API) and the offline statistical engine based on API key availability.
  • lmi_impute_offline() — fully self-contained imputation using nineteen algorithms implemented in base R. No internet connection or API key required.
  • lmi_diagnose() — local missingness audit: reports missing counts, percentages, and column types without any API calls.
  • lmi_set_api_key() / lmi_get_api_key() — session-scoped API key management via options() or the ANTHROPIC_API_KEY environment variable.
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
  • lmi_set_model() / lmi_get_model() — select the Anthropic Claude model used for LLM imputation.
  • lmi_export() — write the imputed data frame and audit trail to CSV or RDS files.
  • lmi_methods() — print a formatted catalogue of all available offline imputation methods with usage guidance.
  • S3 methods print.lmi_result(), summary.lmi_result(), and as.data.frame.lmi_result() for the lmi_result class.
  • Nineteen offline imputation algorithms:
  • Classical: mean, median, mode, LOCF, NOCB, hot-deck, PMM
  • Regression: linear, Lasso (coordinate descent), Ridge (closed form), Bayesian Ridge (evidence approximation)
  • Kernel/neighbour: KNN (scaled Euclidean), SVR (RBF kernel)
  • Tree/ensemble: decision tree (CART), random forest, gradient boosting
  • Iterative: MissForest
  • Matrix completion: PCA imputation (iterative SVD), SoftImpute (nuclear-norm minimisation)

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.5 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK8 OK2026-06-24
Advisories

none known

Documentation

In release 0.1.0
READMENoVignettesYes · 1 · staticNEWSYes · 67% structured · mentions 0.1.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
14 (2 internal)includes a package overview page
Examples that run
92%11 run in a plain check · 1 never run
Exported functions with examples
100%
Documented parameters
98%
Return-value docs
100%
Help pages citing references
0%

Downloads

1.1K
CRAN downloads in the past year
Rank #16,654 · ~3/day · ~91/mo
Daily download trend is not available in this view yet.
27630 days
76190 days
1.1K1 year
Compare downloads with other packages →
Also on22 r2u6 autocran

Dependencies

Declared dependencies
7 external dependencies (excludes base and recommended)

Installing llmimpute adds 14 packages (10 with compiled code, 6.1 MB of source tarballs). Heaviest: openssl 1.1 MB, jsonlite 1.0 MB, vctrs 1.0 MB.

Depends (1)
R >= 4.1.0
Imports (4)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (2)
Author, Maintainer since 0.1.0 (2026)
Releases (1)
  • 0.1.0Latest
    first seen 2026-06-23 · current release
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First seen
2026-06-23
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Download size
43 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("llmimpute")
Islam, S., & Kaushal, R. (2026). llmimpute: Missing Data Imputation via Language Models and Statistics (Version 0.1.0) [Computer software]. https://doi.org/10.32614/CRAN.package.llmimpute

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for llmimpute version 0.1.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy