Accessing templates
To use rticles from RStudio, you can access the
templates through File -> New File -> R Markdown
.
This will open the dialog box where you can select from one of the
available templates:
![New R Markdown](https://bookdown.org/yihui/rmarkdown/images/rticles-templates.png)
If you are not using RStudio, you’ll also need to install Pandoc following these instructions.
Then, use the rmarkdown::draft()
function to create
articles:
rmarkdown::draft(
"MyJSSArticle.Rmd", template = "jss", package = "rticles"
)
rmarkdown::draft(
"MyRJournalArticle", template = "rjournal", package = "rticles"
)
This will create a folder containing a Rmd file using the corresponding output format and all the assets required by this format.
View the list of available journal names with
rticles::journals()
.
Figure numbering & cross-references
You may want to use features of the bookdown package like automatic numbering and cross-referencing of figures and tables in your article. To do this, you’ll need to follow bookdown documentation, i.e. to edit your YAML to:
Switch to the
bookdown::pdf_book
output format, andSupply your rticles template of choice as the
base_format
.
Read more about using the rticles package here: https://bookdown.org/yihui/rmarkdown/journals.html