Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R devtools: create both html and pdf of vignettes

I have written a tutorial in vignette form for one of my packages.

It works fine, but it only creates the html version of the vignette. Is there a way I can create both the html and the pdf version of my vignettes?

I have tried to append rmarkdown::pdf in the output field of my .Rmd file, but it didn't work.

like image 905
lucacerone Avatar asked Nov 24 '14 09:11

lucacerone


1 Answers

This is what I added in the header of my vignette.

output:
  knitr:::html_vignette:
    toc: true
    css: custom.css
    fig_caption: yes
  pdf_document:
    highlight: null
    number_sections: yes

and the I used the command from hrbrmstr above which produces a PDF file.

rmarkdown::render("vignettes/itkr.Rmd", "all")
like image 55
bytesinflight Avatar answered Oct 03 '22 07:10

bytesinflight