This is certainly an issue that can be addressed when I submit my package to the tracker (soon-ish), but maybe it can also benefit other developers if I post it here first.
I have started writing an extremely basic R Markdown vignette (title page and sessionInfo) in R Studio, starting from the template "Bioconductor PDF Document v.2" in BiocStyle. However, I run into two distinct problems below, and I am not sure how to solve either of them.
Problem 1 --- (main problem)
In this post I would like to focus on why I can't build the vignette from the command line:
$ R CMD Sweave vignettes/Introduction.Rmd Warning in engine$weave(file, quiet = quiet, encoding = encoding, ...) : Pandoc (>= 1.12.3) and/or pandoc-citeproc is not available. Please install both. Error in (if (grepl("\\.[Rr]md$", file)) knit2html else if (grepl("\\.[Rr]rst$", : It seems you should call rmarkdown::render() instead of knitr::knit2html() because /Users/kruealbr/Dropbox/Projects/tSVE/vignettes/Introduction.Rmd appears to be an R Markdown v2 document. Calls: <Anonymous> ... <Anonymous> -> <Anonymous> -> vweave -> <Anonymous> -> signal Execution halted
If that is any help: "knitr (>= 1.12)" is present in the "Suggests" field of DESCRIPTION.
How can I help debug my issue? I can't really provide the source of my vignette without the rest of the package, can I? Shall I just submit my package to the tracker, and ask the reviewer to help me then? My package already passes R CMD check and BiocCheck without any problem.
Problem 2 --- (low priority)
R Studio fails to knit the vignette with the following error message:
[truncated] /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS VignettePdf.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output VignettePdf.tex --table-of-contents --toc-depth 2 --template /var/folders/yr/mdmpdgtd23l94f1mnc93qh_400t8__/T//RtmpMVCP9F/BiocStyle/template.tex --number-sections --highlight-style tango --latex-engine /usr/local/bin/pdflatex --include-in-header /var/folders/yr/mdmpdgtd23l94f1mnc93qh_400t8__/T//RtmpMVCP9F/119f141bc0acf.tex output file: Introduction.knit.md Latexmk: This is Latexmk, John Collins, 22 April 2016, version: 4.45. Latexmk: No file name specified, and I couldn't find any Use latexmk -help to get usage information Output created: /private/var/folders/yr/mdmpdgtd23l94f1mnc93qh_400t8__/T/RtmpwSSs5K/preview-111a7589394a2.dir/Introduction.pdf Error in tools::file_path_as_absolute(output_file) : file '/private/var/folders/yr/mdmpdgtd23l94f1mnc93qh_400t8__/T/RtmpwSSs5K/preview-111a7589394a2.dir/Introduction.pdf' does not exist Calls: <Anonymous> -> <Anonymous> Execution halted
It just seems a path problem which I don't know how to solve. However, I don't particularly care for this, as my focus is to solve problem 1: building the vignette from the command line, as the nightly build would do.
I am trying to avoid information overload in this first message, but I'll be happy to provide additional information to drill down in my issue in subsequent messages if needed.
Thanks in advance!