本文介绍了建立和在Windows的RStudio中重新加载:devtools :: document()说找不到devtools的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在RStudio的构建选项卡上单击构建并重新加载时,出现以下错误:

When I click "Build & Reload" on the Build tab within RStudio, I get the following error:

==> devtools::document(roclets=c('rd', 'collate', 'namespace'))

Error in loadNamespace(name) : there is no package called 'devtools'
Calls: suppressPackageStartupMessages ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

Exited with status 1.

但是当我只要直接在控制台中输入 devtools :: document(roclets = c('rd','collat​​e','namespace'))即可。

But when I just enter devtools::document(roclets=c('rd', 'collate', 'namespace')) directly into the console, it works.

此外,如果在构建工具-> Roxygen配置中取消选中运行时自动充氧:下的构建并重新加载,则错误消失。

In addition, if I uncheck "Build & Reload" under "Automatically roxygenize when running:" in the Build Tools -> Roxygen config, the error disappears.

我已经安装了最新的 devtools devtools :: install_github( hadley / devtools)。我正在使用Windows。

I've installed the latest devtools with devtools::install_github("hadley/devtools"). I'm using Windows.

如果有人有建议,请提前谢谢!

If anyone has an suggestions, thank you in advance!

推荐答案

我必须在构建工具-> Roxygen配置菜单中的运行时自动重新充氧:下取消选中构建并重新加载。在程序文件/r/3.2.3/lib中安装devtools很有帮助,但它仍然仍然需要所有依赖项。使用packrat似乎也无济于事。

I had to uncheck "Build & Reload" under "Automatically reoxygenize when running:" in the Build Tools -> Roxygen Configure menu. Installing devtools in the program files/r/3.2.3/lib helped, but it still wanted all the dependencies there as well. Using packrat didn't seem to help either..

这篇关于建立和在Windows的RStudio中重新加载:devtools :: document()说找不到devtools的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 00:57