debugging-r-environment-and-dependencies

Diagnose and fix R environment issues, including package installation failures, dependency conflicts, system library problems, renv errors, and Bioconductor version mismatches.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "debugging-r-environment-and-dependencies" with this command: npx skills add JackKuo666/debugging-r-environment-and-dependencies

Debugging R Environment and Dependencies

This skill focuses on resolving problems related to R environments rather than analysis logic. It helps restore a working setup so that R scripts and projects can run successfully.

Use this skill when the user encounters:

  • Package installation failures
  • Version conflicts between packages
  • renv or packrat environment issues
  • Bioconductor version mismatches
  • System dependency errors (e.g., missing compilers or libraries)
  • R failing to start or load packages

What This Skill Does

When activated, this skill will:

  1. Diagnose the environment

    • Check R version
    • Check installed packages and versions
    • Inspect renv.lock or project library
    • Identify Bioconductor version compatibility
  2. Resolve package installation issues

    • Suggest correct CRAN/Bioconductor repositories
    • Install missing system dependencies (e.g., libxml2, curl, openssl)
    • Handle compilation failures on Linux/macOS/Windows
  3. Fix dependency conflicts

    • Align package versions
    • Reinstall broken packages
    • Clean corrupted package libraries
  4. Repair project environments

    • Restore with renv::restore()
    • Rebuild renv.lock
    • Reinitialize project library if needed
  5. Bioconductor troubleshooting

    • Match Bioconductor version to R version
    • Use BiocManager::install() correctly
    • Resolve common bioinformatics package errors
  6. System-level troubleshooting

    • Install missing compilers (e.g., gcc, gfortran)
    • Install development libraries required for R packages
    • Fix PATH or permission issues

Example User Requests That Should Trigger This Skill

  • "I can't install tidyverse"
  • "This package fails with a compilation error"
  • "renv restore is broken"
  • "Bioconductor says my version is incompatible"
  • "library() fails even though the package is installed"
  • "R says shared object cannot be loaded"

Example Workflow

User: I get an error when installing sf.

Skill actions:

  • Detect missing system libraries (GEOS, GDAL, PROJ)
  • Provide OS-specific install commands
  • Retry R package installation
  • Confirm successful library loading

Common Problem Categories

CategoryExamples
Missing system libsxml2, curl, openssl, sf, rJava
Compiler issuesgfortran missing, Xcode tools missing
Version mismatchold R vs new package
Bioconductor mismatchwrong Bioc version for R
renv problemscorrupted cache, lockfile mismatch
Permission issuescannot write to library path

Notes

  • Do not modify analysis code unless necessary
  • Prefer fixing the environment over rewriting scripts
  • Always aim to make the project reproducible
  • Recommend renv for future environment stability

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Sendflare

通过 Sendflare SDK 发送带附件的电子邮件,管理联系人列表,支持 CC/BCC 和安全 API 认证。

Registry SourceRecently Updated
General

Playtomic - Book courts using padel-tui

This skill should be used when the user asks to "book a padel court", "find available padel courts", "search padel courts near me", "reserve a Playtomic cour...

Registry SourceRecently Updated
General

Fund Keeper

国内场外基金智能顾问 + 股票行情查询。实时估值、买卖建议、收益统计、定投计划、OCR 识图、股票 - 基金联动。支持离线模式、多数据源缓存。

Registry SourceRecently Updated