我发现自己在我的Rmd帖子中使用了很多相同的R代码,并且目前有一个模板文件,我将这个常见的R代码粘贴到新帖子中.但是,现在我想知道是否可以修改Rmd帖子模板以包含这些常见R代码行,并提醒自己如何做一些事情.如果这与RStudio中的blogdown addin"new post"一起使用会很好.
我在这里搜索了博客书和blogdown repo,但没有看到有关如何执行此操作的信息.最接近似乎是https://bookdown.org/yihui/blogdown/default-template.html但这是用于修改html模板,而不是Rmd模板.
这是一个示例Rmd文件,我想用作我的Rmd帖子模板https://gist.github.com/lcolladotor/eafaae5de96d84440acee4fc9393ffcc
最好的,莱昂纳多
PS博客在http://lcolladotor.github.io/2018/02/17/r-markdown-blog-template/上博客,最后在http://lcolladotor.github.io/2018/03/08/blogdown- archetype-template /.