| setup_carbon_tracker | R Documentation |
Installs Miniconda if it isn't already present, then creates the
"r-codecarbon" conda environment and installs codecarbon into it. Run this
once per machine before using carbon_tracker() or
with_emissions_tracked(). Nothing is installed without confirmation, and
the function refuses to run outside an interactive session.
setup_carbon_tracker(force = FALSE)
force |
Reinstall codecarbon even if it's already available. |
Installs codecarbon >= 2.2.2 – a floor, not an exact pin. That's the
oldest version this package has actually been validated against (see
comparison/coverage_matrix.md and NEWS.md for exactly which versions
were validated, and where); newer codecarbon releases are expected and
welcome, since they bring updated carbon-intensity data along with
whatever bug fixes landed upstream. codecarbon's behavior has changed
between versions before (see carbon_tracker()'s docs on tracker
restart), so if something about CodeCarbonR's output looks different
after a codecarbon upgrade, that's the first thing to check. Keep the
floor here in sync with DESCRIPTION's SystemRequirements field if it
changes.
Invisibly, TRUE if codecarbon is ready to use after the call,
FALSE if setup was cancelled.
## Not run:
# Installs software and prompts for confirmation, so this never runs
# under R CMD check (or any other non-interactive session) -- call it
# once, by hand, from an interactive R console.
setup_carbon_tracker()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.