Why do you want to use rmarkdown and not knitr ? At first glance, your question looks a little confused between rmarkdown and knitr . To clarify:
rmarkdown is an "authoring format" that is "based on knitr and pandoc." When we run rmarkdown::render , we call knitr and / or pandoc.
knitr is an engine that converts rmarkdown to html / PDF / docx. This is what R code executes to get output and graphs, etc.
The author of < knitr already mentioned that "since the rmarkdown package is not yet included in CRAN, you cannot use the knitr :: rmarkdown vignette engine at the moment." If you can’t wait, you can register your own engine , but it looks rather complicated.
I think you want:
This is at the top of your Rmd document:
And this is in your DESCRIPTION file:
VignetteBuilder: knitr Suggests: knitr
For a complete example, check out the tidyr package , here DESCRIPTION , and here rmarkdown vignette (a tip for Andrie to point this out).
If you need something specific from rmarkdown that you cannot get from knitr (user style, etc.) then you should put this in a new question.
source share