
Installation and Configuration Guide
Rodolfo Tasso Suazo
2026-05-25
Source:vignettes/installation.Rmd
installation.RmdThe ciecl package is designed to work with ICD-10 and
ICD-11 classifications in the Chilean clinical context. This guide
covers the recommended installation, system requirements, and the
configuration of external credentials.
Basic Installation
The easiest way to install ciecl is using the
pak package, which automatically manages system
dependencies and R package requirements.
From CRAN (Stable Version)
# Install pak if you don't have it
if (!requireNamespace("pak", quietly = TRUE)) install.packages("pak")
# Install ciecl
pak::pkg_install("ciecl")From GitHub (Development Version)
To use the latest features from the rev-ropensci
branch:
pak::pkg_install("RodoTasso/ciecl@rev-ropensci")Installation with Optional Dependencies
The package has minimal dependencies for core functionality. To enable all features, including comorbidity indices and interactive tables:
# Full installation with all optional packages
pak::pkg_install("RodoTasso/ciecl", dependencies = TRUE)System Requirements
The package uses a local SQLite database to ensure high performance in vectorized searches.
ICD-11 API Configuration (Optional)
To use cie11_search() and access the WHO ICD-11
international classification, you need free credentials.
- Register at icd.who.int/icdapi.
- Obtain your Client ID and Client Secret.
Credential Management
Option A: Using keyring
(Recommended)
The keyring package stores secrets in the OS native
keychain (macOS Keychain, Windows Credential Store, Linux Secret
Service), avoiding plain text secrets in your environment files.
# Store credentials once (it will prompt for them)
# Format: "client_id:client_secret"
keyring::key_set("ciecl_icd11")
# Use them in your session
Sys.setenv(ICD_API_KEY = keyring::key_get("ciecl_icd11"))Option B: Using .Renviron File
Add the following line to your ~/.Renviron file (you can
use usethis::edit_r_environ()):
ICD_API_KEY=your_client_id:your_client_secret
Restart R for the changes to take effect. Ensure
.Renviron is not tracked by Git.
Verify Installation
library(ciecl)
# Check package version
packageVersion("ciecl")
# Verify catalog access
nrow(cie10_cl) # Should return ~39,873 records
# Test basic lookup
cie_lookup("E11.0")
# Test fuzzy search
cie_search("diabetes")Troubleshooting
Connection to Local Database
If you encounter errors related to the database connection or corrupt data, force a rebuild of the local cache:
ciecl::cie10_clear_cache()Manual Proxy Configuration
If you are behind a corporate proxy, configure your R environment before using the WHO API:
Sys.setenv(https_proxy = "http://your-proxy-url:port")Support
- Report issues: https://github.com/RodoTasso/ciecl/issues
- Documentation: https://rodotasso.github.io/ciecl/