我目前正在制作一个R包(tessellation),其中包括一些C代码。当我在RStudio中进行一些修改并单击“安装和重新启动”时,我会得到以下错误:
==> Rcmd.exe INSTALL --no-multiarch --with-keep.source tessellation
* installing to library 'C:/PortableApps/R/R-4.1.2/App/R-Portable/library'
* installing *source* package 'tessellation' ...
ERROR: cannot remove earlier installation, is it in use?当我在“安装和重新启动”之前做“重新启动R会话”时,有时工作,有时不工作。所以我不得不关闭这个项目,重新打开它,这是很烦人的。你知道我怎样才能更方便地工作吗?
发布于 2021-12-30 01:49:18
您需要确保包没有被使用(或加载到R的搜索路径)。我建议停止所有R会话,手动删除已安装的包文件夹,启动manually会话,检查附加的包/搜索路径,最后尝试重新安装/构建包:
# from terminal
R --vanilla
# check search path
ls()
search()
# attempt installing package
devtools::install() # or devtools::build()https://stackoverflow.com/questions/70523276
复制相似问题