在R包中,我有一个位于man/figures
下的图形(jpeg),它被添加到Rd文件中,
\if{html}{\figure{supplydemand.jpg}{Supply-demand}}
\if{latex}{\figure{supplydemand}{Supply-demand}}
更新到roxygen2 4.0.1后,我收到错误:
==> roxygen2::roxygenize('.', roclets=c('rd', 'collate', 'namespace'))
Error in file(con, "r") : cannot open the connection
Calls: suppressPackageStartupMessages ... <Anonymous> -> first_time -> vapply -> FUN -> readLines -> file
In addition: Warning message:
In file(con, "r") : cannot open file './man/figures': Permission denied
Execution halted
Exited with status 1.
如果我删除插入图的代码,我仍然会收到此错误。只有当我删除子目录man/figures
时,roxygen2才能正常工作。
我认为这是roxygen2中的一个错误,还是有解决方法?