devtools::build_manual((生成Error: Failed to build manual
(至少在windows上(。
复制步骤:
- 在R Studio上创建一个新的R项目
- 为hello_world函数添加此文档,记录并构建包
#' Hello world doc
#'
#' @export
#'
hello <- function() {
print("Hello, world!")
}
- 尝试运行
devtools::build_manual()
错误:无法构建手动
这似乎是最近的一期;不久前我就可以制作我的软件包手册了。我在这个问题中尝试了check_manual((函数,得到的是:
> check_man()
Checking: hello.RdError: Failed to build manual
Called from: value[[3L]](cond)
Browse[1]> e
System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last 10 lines):
E> ima/AppData/Roaming/TinyTeX/texmf-dist/fonts/type1/urw/times/utmb8a.pfb><c:/Use
E> rs/plima/AppData/Roaming/TinyTeX/texmf-dist/fonts/type1/urw/times/utmr8a.pfb><c
E> :/Users/plima/AppData/Roaming/TinyTeX/texmf-dist/fonts/type1/urw/times/utmri8a.
E> pfb>
E> Output written on Rd2.pdf (1 page, 50650 bytes).
E> Transcript written on Rd2.log.
E> Warning in sys2(makeindex, shQuote(idxfile)) : '"makeindex"' not found
E> Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, :
E> unable to run 'makeindex' on 'Rd2.idx'
E> Error in running tools::texi2pdf()
我不知道该怎么处理这个输出。我所知道的是,不久前我就可以制作手册了。
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] manualtest_0.1.0
loaded via a namespace (and not attached):
[1] magrittr_2.0.1 usethis_2.0.1 devtools_2.4.2 pkgload_1.2.1 R6_2.5.0 rlang_0.4.11
[7] fastmap_1.1.0 fansi_0.5.0 tools_4.1.0 pkgbuild_1.2.0 sessioninfo_1.1.1 utf8_1.2.2
[13] cli_3.0.1 withr_2.4.2 ellipsis_0.3.2 remotes_2.4.0 rprojroot_2.0.2 tibble_3.1.3
[19] lifecycle_1.0.0 crayon_1.4.1 processx_3.5.2 purrr_0.3.4 callr_3.7.0 vctrs_0.3.8
[25] fs_1.5.0 ps_1.6.0 testthat_3.0.4 memoise_2.0.0 glue_1.4.2 cachem_1.0.5
[31] pillar_1.6.1 compiler_4.1.0 desc_1.3.0 prettyunits_1.1.1 pkgconfig_2.0.3
运行tinytex::tlmgr_install("makeindex")
解决了问题,无需重新安装tinytex。