This repository contains Quarto templates that can be used for scripting in R. These templates can be matched with templates in an electronic lab journal like RSpace and uploaded to RSpace using the rspacer package.
- Open RStudio, or a specific R project with renv for which you want to use these templates.
- Install the templates using:
remotes::install_github("LACDR/LACDR.ISA")- In RStudio, go to File > New File > R Markdown.
- On the left, click From Template.
- Choose either the Investigation, Study or Assay template. Make any edits and perform your analysis. Save the file as a Quarto file (.qmd).
- Render the files to reports for reproducible science.
- If you want to upload your Investigation, Study or Assay to Rspace, follow the rspacer instructions.
This repository is meant to be very general for our research institute, the LACDR. If you and your research group want to have more specific templates or use the same custom workflows, take a look at R_templates_dds for some more examples. You can also make your own:
- Fork or clone this repository.
- Open the .Rproj project file to open the R Project.
- Edit a template, or add your own and put this in a separate folder in inst/rmarkdown/templates.
- In the top right panel in RStudio, click on Build, next to the Environment, History.
- Install.
- Restart Rstudio.
- Templates are stored in skeleton folders and skeleton files within inst/rmarkdown/templates.
- Each template has its own folder.
- Edit the skeleton file. Also, check if the YAML file is still matching the skeleton.
- Save your changes.
- In the top right panel in RStudio, click on Build. This is located next to Environment, History, Connections and Tutorial.
- Install.
- Restart Rstudio.
- Don't forget to commit the changes and push to the remote repository if needed!
Currently (29-06-2024), creating Quarto documents from templates in RStudio is not possible. That is why we decided to use the R Markdown From Template buttons. If this is possible in the future, we aim to update this repository.
This repository is developed in parallel with rspacer instructions and R_templates_dds. It may happen that we forget to include changes in this repository after a new rspacer release. Please let us know if there are any issues!
- We built this package using the instructions on https://rstudio4edu.github.io/rstudio4edu-book/rmd-templates.html part 12.
- Instructions on https://rstudio4edu.github.io/rstudio4edu-book/rmd-templates.html were used to create a template that matches our ISA standards.