CodeCarbonR: Track Energy Consumption and Carbon Emissions of R Code

Wraps the Python 'codecarbon' package via 'reticulate' to measure the energy consumption and estimated carbon emissions of R code. Provides a self-contained setup routine that installs 'codecarbon' into a dedicated conda environment, and an R-facing tracker API for measuring a block of code or a longer-running session.

Version: 0.1.0
Imports: R6, reticulate
Suggests: knitr, pkgdown, rmarkdown, testthat (≥ 3.0.0)
Published: 2026-09-05
DOI: 10.32614/CRAN.package.CodeCarbonR (may not be active yet)
Author: Beatrice Bock ORCID iD [aut, cre, cph], Rachel Paterson [aut], Dylan van Bramer [aut]
Maintainer: Beatrice Bock <beabockm at gmail.com>
BugReports: https://github.com/beabock/CodeCarbonR/issues
License: MIT + file LICENSE
URL: https://beabock.github.io/CodeCarbonR/, https://github.com/beabock/CodeCarbonR
NeedsCompilation: no
SystemRequirements: Python (>= 3.9); codecarbon Python package (>= 2.2.2), installed via setup_carbon_tracker()
Citation: CodeCarbonR citation info
Materials: README, NEWS
CRAN checks: CodeCarbonR results

Documentation:

Reference manual: CodeCarbonR.html , CodeCarbonR.pdf
Vignettes: Quickstart (source, R code)

Downloads:

Package source: CodeCarbonR_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=CodeCarbonR to link to this page.