You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _quarto.yml
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ date-modified: last-modified
29
29
description: |
30
30
This document provides a template based on the [quarto](https://quarto.org/) system for contributions to Computo, using the [quarto journal extension](https://github.com/computorg/computo-quarto-extension), the knitr kernel (R user) and [renv](https://rstudio.github.io/renv/articles/renv.html) to set-up the dependencies.
31
31
32
-
**All important information about writing and preparing an article to be submitted to Computo, and related technicalities** are detailed [in the guidelines for authors](https://computo-journal.org/site/guidelines-authors.html).
32
+
For a detailed, step-by-step guide on preparing your article and submitting it to Computo, please consult the [guidelines for authors](https://computo-journal.org/site/guidelines-authors.html).
33
33
abstract: >+
34
34
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur posuere vestibulum facilisis. Aenean pretium orci augue, quis lobortis libero accumsan eu. Nam mollis lorem sit amet pellentesque ullamcorper. Curabitur lobortis libero eget malesuada vestibulum. Nam nec nibh massa. Pellentesque porttitor cursus tellus. Mauris urna erat, rhoncus sed faucibus sit amet, venenatis eu ipsum.
35
35
keywords: [key1, key2, key3]
@@ -38,6 +38,7 @@ github-user: computorg
38
38
repo: "template-computo-r"
39
39
draft: true # set to false once the build is running
40
40
published: false # will be set to true once accepted
Copy file name to clipboardExpand all lines: template-computo-R.qmd
+5-71Lines changed: 5 additions & 71 deletions
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,12 @@
2
2
3
3
## About this document
4
4
5
-
This document, accompanied with the [hopefully finely tuned git repos](https://github.com/computorg/template-computo-R/), provides a template for writing contributions to **Computo**[@computo]. We show how `R` code [@R-base] can be included and how the repository can be set up for triggering github actions for rendering the document, with dependencies handled by `renv`.
5
+
This document, accompanied with the [tuned git repos](https://github.com/computorg/template-computo-R/), provides a template for writing contributions to **Computo**[@computo].
6
6
7
-
## Setup a github repository for preparing your submission
8
-
9
-
You can start by clicking the **"use this template"** button, on the top of the page of the [github repository associated to this document](https://github.com/computorg/template-computo-R/). Of course, you can set your repository private during the preparation of your manuscript.
7
+
::: {.callout-tip}
8
+
## Note
9
+
This document provides only the main steps and key formatting principles. For a detailed, step-by-step guide on preparing your article and submitting it to Computo, please consult the [guidelines for authors](https://computo-journal.org/site/guidelines-authors.html).
10
+
:::
10
11
11
12
## Quarto
12
13
@@ -22,14 +23,6 @@ quarto add computorg/computo-quarto-extension
22
23
23
24
[`R`](https://www.r-project.org/) and the following `R` packages must be installed on your computer: [`knitr`](https://cran.r-project.org/package=knitr), [`markdown`](https://cran.r-project.org/package=markdown).
24
25
25
-
## Link with your usual tools
26
-
27
-
Quarto is expecting a `.qmd` markdown file, but will also works with a standard [`Rmarkdown`](https://rmarkdown.rstudio.com/) (`.Rmd`) file. In addition, especially if you are not comfortable with the command line interface, quarto is fully integrated inside the [Rstudio IDE](https://quarto.org/docs/get-started/hello/rstudio.html) so that you can write and build your quarto document inside Rstudio.
28
-
29
-
Quarto can also process a [Jupyter notebook](https://quarto.org/docs/get-started/hello/jupyter.html) file if you are used to it (it will just require to add the proper YAML metadata^[the same metadata as in the [`template-computo-R.qmd` file](https://github.com/computorg/template-computo-R/blob/main/template-computo-R.qmd) in the first cell, type "Raw", of the notebook]).
30
-
31
-
**Note**: _More advanced Jupyter-related functionality like Myst/Jupyter book are not supported in this Quarto setup. The markdown syntax inside the Jupyter notebook should follow the Quarto syntax (c.f. [below](#formatting)). If you are more comfortable with using Myst/Jupyter book, we provide a [specific template](https://github.com/computorg/template-computo-myst) but it will requires more formatting work for Computo editorial team, thus highly encourage authors to use the Quarto templates._
32
-
33
26
# Formatting
34
27
35
28
This section covers basic formatting guidelines for quarto documents.
@@ -196,65 +189,6 @@ Advanced formatting features are possible and documented (including interactive
196
189
197
190
:::
198
191
199
-
# Finalize your submission
200
-
201
-
## Handle `R` dependencies with `renv`
202
-
203
-
To make your work reproducible, you need to fix the packages and environment used to run your analysis. For the `R` system, the `renv` package is one of the possible reliable method, supported by the community. You basically need a couple of commands to setup your environment on your local machine. First,
204
-
205
-
```{r, eval = FALSE}
206
-
renv::init()
207
-
```
208
-
209
-
will initialize your repository. Then you just need to install the dependencies required to run your contribution, for instance,
210
-
211
-
212
-
```{r, eval=FALSE}
213
-
renv::install("ggplot2") # or equivalently install.packages("ggplot2")
214
-
```
215
-
216
-
Non-CRAN packages (*e.g.* Github packages) can be used. Once you are done, you can fix everything with the command
217
-
218
-
```{r, eval=FALSE}
219
-
renv::snapshot()
220
-
```
221
-
222
-
::: {.callout-important}
223
-
The only file that needs to be versioned by git is `renv.lock`. By default, the rest is ignored thanks to `.gitignore`.
224
-
:::
225
-
226
-
More details for using `renv` can be found either
227
-
228
-
- on the [`renv` packge webpage](https://rstudio.github.io/renv/articles/renv.html), or
229
-
- on the [quarto page dedicated to environments](https://quarto.org/docs/projects/virtual-environments.html#using-renv)
230
-
231
-
## Continuous integration
232
-
233
-
The repository associated with this template is pre-configure to trigger an action on push that performs the following:
234
-
235
-
1. Check out repository on the `ubuntu-latest` machine
236
-
2. Install quarto and dependencies, including the Computo extension
237
-
3. Install R and dependencies with `renv`, using your `renv.lock` file
238
-
4. Render your .qmd file and Publish the results on a gh-page (both HTML and PDF)
239
-
240
-
The file [.github/workflows/build.yml](https://github.com/computorg/template-computo-R/blob/main/.github/workflows/build.yml) is largely inspired from [this file](https://quarto.org/docs/publishing/github-pages.html#example-knitr-with-renv).
241
-
242
-
Once this is successful, you are ready to submit your manuscript to the [Computo submission platform](https://computo.scholasticahq.com/).
243
-
244
-
::: {.callout-warning}
245
-
The first time, you possibly need to create the branch for the action to work. This can be done by running the following command from your computer, in your git repository:
246
-
247
-
```.bash
248
-
quarto publish gh-pages
249
-
```
250
-
251
-
Then, set the branch `gh-page` as the source of your github page, and trigger the action to check that everything works fine.
252
-
:::
253
-
254
-
## Data and large files
255
-
256
-
If your submission materials contain files larger than 50MB, **especially data files**, they won’t fit on a git repository as is. For this reason, we encourage you to put your data or any materials you deem necessary on an external “open data” centered repository hub such a [Zenodo](https://zenodo.org/) or [OSF](https://osf.io/).
0 commit comments