Error building R Markdown v2 document
1
1
Entering edit mode
kevin.rue ▴ 350
@kevinrue-6757
Last seen 6 months ago
University of Oxford

Hi,

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!

Kevin

biocstyle • 3.2k views
ADD COMMENT
2
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

Package development questions belong on the bioc-devel mailing list.

For problem 1, your system needs to have pandoc and pandoc-citeproc installed. How you install those depends on your operating system, but a short-cut is to find them in your RStudio installation, and make sure that location is on your PATH environment variable.

Have you set up your DESCRIPTION file and Rmd file following the instructions in section 1.1.3 of the LatexStyle2 vignette?

ADD COMMENT
0
Entering edit mode

Sorry for using the User mailing list. 

Installing pandoc and pandoc-citeproc solved the issue perfectly. Thanks!

My DESCRIPTION file was set up as recommended in the linked document. I just hadn't found the information about the requirement for pandoc and co. :)

Thanks again for the quick answer!

Kevin

ADD REPLY

Login before adding your answer.

Traffic: 694 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6