我尝试执行代码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
------------我的包裹名称是BayesianAAAA ------------------------------ -
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
答案 0 :(得分:2)
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
。