r - 警告:`pkgname` 既不是文件也不是目录,跳过
问题描述
我尝试执行代码 R CMD check pkgname
,但其结果是
C:\Users\username>R CMD check pkgname
Warning: 'pkgname' is neither a file nor directory, skipping
我也执行了以下,但它并不顺利。
C:\Users\username>R CMD Rd2pdf pkgname
Converting Rd files to LaTeX ...
pkgname
Warning in file(con, "r") :
cannot open file 'pkgname': No such file or directory
Error in file(con, "r") : cannot open the connection
------------我的包名是贝叶斯AAAA--------------------------------
C:\Users\username>R CMD check BayesianAAAA
Warning: 'BayesianAAAA' is neither a file nor directory, skipping
C:\Users\username>R CMD Rd2pdf BayesianAAAA
Converting Rd files to LaTeX ...
BayesianAAAA
Warning in file(con, "r") :
cannot open file 'BayesianAAAA': No such file or directory
Error in file(con, "r") : cannot open the connection
------------在我的包目录上打开命令提示符--------------------------------
通过 [shift] + 右键单击,我在我的包上打开命令提示符并运行上面的代码。但是结果与上一个相同。
C:\Users\usename\Desktop\BayesianAAAA>R CMD Rd2pdf BayesianAAAA
Converting Rd files to LaTeX ...
BayesianAAAA
Warning in file(con, "r") :
cannot open file 'BayesianAAAA': No such file or directory
Error in file(con, "r") : cannot open the connection
--------- 通过我的 pkg 目录的路径编写,代码运行良好!伟大的 !!------------------
C:\Users\usename>R CMD Rd2pdf C:\Users\usename\Desktop\BayesianFROC
Hmm ... looks like a package
Converting Rd files to LaTeX ...
Creating pdf output from LaTeX ...
sed: not found
sed: not found
kpsewhich: not found
cat: not found
Warning: running command '"C:\w32tex\bin\texi2dvi.exe" --pdf "Rd2.tex" ' had status 1
Saving output to 'BayesianAAAA.pdf' ...
Done
'BayesianAAAA.pdf' not found
Warning: running command 'open BayesianAAAA.pdf' had status 34
解决方案
to 的参数R CMD check
必须是.tar.gz
文件名或目录名。由于您当前的工作目录是C:\Users\usename\Desktop\BayesianAAAA
要使用的目录名称.
,因此不是BayesianAAAA
. 如果你想
R CMD check BayesianAAAA
要工作,您的工作目录必须是C:\Users\usename\Desktop
. 或者,您应该能够使用
R CMD check C:/Users/usename/Desktop/BayesianAAA
但是如果usename
里面有空格,如果没有在路径周围进行某种引用,这可能是行不通的。
顺便说一句,如果您使用 RStudio,这会容易得多:您将包设置为项目,然后只需单击选项Check
卡Build
。
推荐阅读
- reactjs - 反应 JSON 数组顺序
- javascript - BAD Reuqest 无法创建和填充列表类型 Microsoft.AspNetCore.Http.IFormFileCollection
- php - 即使使用准备好的语句,PDO 也不处理字段数据中的撇号
- bash - 清除/截断在 linux 上工作但在 mac 上不工作的 Kafka 主题
- python - 这个scrapy请求没有回调
- machine-learning - AttributeError:“NoneType”对象没有属性“predict_classes”
- javascript - 仅模拟 Angular 服务的一种方法
- mysql - 在 MySQL 中限制多个 id 仅显示 2 行
- javascript - 表格中奇怪的最后一行
- dart - 缓存数据并将缓存数据提供给 StreamBuilder Flutter