I noticed thanks to a blog post by @pbaumgartner that you can create markdown snippets and use them in .Rmd and .Rmarkdown files.
However, I often like to write my R markdown as .R
files instead, put the markdown code in roxygen2
-style comments, and using knitr::spin()
to compile them into a document.
But in roxygen2
comments, the only code completion that works is roxygen2
code completion, like @aliases
and @export
. Is there a way to make my markdown snippets work in roxygen2
-style comments when I'm using the knitr::spin()
workflow?