返回顶部
d

debugging-r-environment-and-dependenciesR环境调试与依赖

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

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
449
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

debugging-r-environment-and-dependencies

调试R环境与依赖项

本技能专注于解决与R环境相关的问题,而非分析逻辑。它有助于恢复可正常工作的配置,使R脚本和项目能够成功运行。

当用户遇到以下情况时,请使用此技能:

  • - 包安装失败
  • 包之间的版本冲突
  • renv或packrat环境问题
  • Bioconductor版本不匹配
  • 系统依赖错误(例如,缺少编译器或库)
  • R无法启动或加载包



本技能的功能

激活后,本技能将:

  1. 1. 诊断环境
- 检查R版本 - 检查已安装的包及其版本 - 检查renv.lock或项目库 - 识别Bioconductor版本兼容性
  1. 2. 解决包安装问题
- 建议正确的CRAN/Bioconductor仓库 - 安装缺失的系统依赖项(例如libxml2、curl、openssl) - 处理Linux/macOS/Windows上的编译失败
  1. 3. 修复依赖冲突
- 对齐包版本 - 重新安装损坏的包 - 清理损坏的包库
  1. 4. 修复项目环境
- 使用renv::restore()恢复 - 重建renv.lock - 必要时重新初始化项目库
  1. 5. Bioconductor故障排除
- 将Bioconductor版本与R版本匹配 - 正确使用BiocManager::install() - 解决常见的生物信息学包错误
  1. 6. 系统级故障排除
- 安装缺失的编译器(例如gcc、gfortran) - 安装R包所需的开发库 - 修复PATH或权限问题

应触发此技能的示例用户请求

  • - 我无法安装tidyverse
  • 这个包编译时出错
  • renv restore坏了
  • Bioconductor说我的版本不兼容
  • 即使包已安装,library()也失败
  • R说无法加载共享对象

示例工作流程

用户: 安装sf时出现错误。

技能操作:

  • - 检测缺失的系统库(GEOS、GDAL、PROJ)
  • 提供特定操作系统的安装命令
  • 重试R包安装
  • 确认库加载成功



常见问题类别


类别示例
缺失系统库xml2、curl、openssl、sf、rJava
编译器问题
缺少gfortran、缺少Xcode工具 |
| 版本不匹配 | 旧版R与新版包 |
| Bioconductor不匹配 | R的Bioc版本错误 |
| renv问题 | 缓存损坏、锁文件不匹配 |
| 权限问题 | 无法写入库路径 |


备注

  • - 除非必要,否则不要修改分析代码
  • 优先修复环境而非重写脚本
  • 始终致力于使项目可重现
  • 推荐使用renv以确保未来环境的稳定性

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 debugging-r-environment-and-dependencies-1776298625 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 debugging-r-environment-and-dependencies-1776298625 技能

通过命令行安装

skillhub install debugging-r-environment-and-dependencies-1776298625

下载

⬇ 下载 debugging-r-environment-and-dependencies v0.1.0(免费)

文件大小: 6.72 KB | 发布时间: 2026-4-16 18:19

v0.1.0 最新 2026-4-16 18:19
- Initial release of the R environment and dependency debugging skill.
- Diagnose and resolve package installation failures, version conflicts, and system dependency errors.
- Troubleshoot and repair `renv` or Bioconductor environment issues.
- Provide guidance for missing compilers, development libraries, and PATH/permission problems.
- Restore or rebuild working R project environments to ensure script compatibility.
- Offer OS-specific steps for resolving common package and system-level R problems.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部