From 0d791aeef34741c6df59d25e26d9826803aa53a1 Mon Sep 17 00:00:00 2001 From: Nicolas Casajus Date: Mon, 23 Oct 2023 10:32:08 +0200 Subject: [PATCH] style: update README templates - fix #40 --- inst/templates/README-comp.Rmd | 103 ++++++++++++++++++-------- inst/templates/README-pkg.Rmd | 77 ++++++++++++++++--- inst/templates/compendium-sticker.png | Bin 0 -> 7377 bytes 3 files changed, 141 insertions(+), 39 deletions(-) create mode 100644 inst/templates/compendium-sticker.png diff --git a/inst/templates/README-comp.Rmd b/inst/templates/README-comp.Rmd index 16bc6cd..b2eedb8 100644 --- a/inst/templates/README-comp.Rmd +++ b/inst/templates/README-comp.Rmd @@ -14,67 +14,112 @@ knitr::opts_chunk$set(collapse = TRUE, -# {{project_name}} - +{{project_name}} +========================================================= -Research Compendium of the project **{{ PLEASE ADD A FEW WORDS }}** +

+ • Overview
+ • Features
+ • Content
+ • Installation
+ • Usage
+ • Citation
+ • Contributing
+ • Acknowledgments
+ • References +

-### How to cite -Please cite this compendium as: +## Overview -> **{{ PLEASE ADD A CITATION }}** +This research compendium... **{{ DESCRIBE YOUR PROJECT }}** -### Content +## Features + +The main purpose of this compendium is to... **{{ DESCRIBE THE MAIN FEATURES }}** + -This repository is structured as follow: -- [`data/`](https://github.com/{{github}}/{{project_name}}/tree/master/data): -contains all raw data required to perform analyses +## Content -- [`analyses/`](https://github.com/{{github}}/{{project_name}}/tree/{{branch}}/analyses/): -contains R scripts to run each step of the workflow +This repository is structured as follow: -- [`outputs/`](https://github.com/{{github}}/{{project_name}}/tree/{{branch}}/outputs): -contains all the results created during the workflow +- [`DESCRIPTION`](https://github.com/{{github}}/{{project_name}}/tree/{{branch}}/DESCRIPTION): +contains project metadata (authors, date, dependencies, etc.) -- [`figures/`](https://github.com/{{github}}/{{project_name}}/tree/{{branch}}/figures): -contains all the figures created during the workflow +- [`make.R`](https://github.com/{{github}}/{{project_name}}/tree/{{branch}}/make.R): +main R script to run the entire project - [`R/`](https://github.com/{{github}}/{{project_name}}/tree/{{branch}}/R): contains R functions developed especially for this project -- [`man/`](https://github.com/{{github}}/{{project_name}}/tree/{{branch}}/man): -contains help files of R functions +- **{{ LIST ADDITIONAL FILES/FOLDER }}** -- [`DESCRIPTION`](https://github.com/{{github}}/{{project_name}}/tree/{{branch}}/DESCRIPTION): -contains project metadata (author, date, dependencies, etc.) -- [`make.R`](https://github.com/{{github}}/{{project_name}}/tree/{{branch}}/make.R): -main R script to run the entire project by calling each R script stored in the `analyses/` folder +## Installation +To install this compendium: -### Usage +- [Fork](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) +this repository using the GitHub interface. +- [Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) +your fork using `git clone fork-url` (replace `fork-url` by the URL of your fork). +Alternatively, open [RStudio IDE](https://posit.co/products/open-source/rstudio/) +and create a New Project from Version Control. -Clone the repository, open R/RStudio and run: -```{r eval = FALSE} -source("make.R") -``` +## Usage + +Launch the [`make.R`](https://github.com/{{github}}/{{project_name}}/tree/{{branch}}/make.R) +file with: +```{r eval=FALSE} +source("make.R") +``` -### Notes +**Notes** -- All required packages, listed in the `DESCRIPTION` file, will be installed (if necessary) +- All required packages listed in the `DESCRIPTION` file will be installed (if necessary) - All required packages and R functions will be loaded - Some analyses listed in the `make.R` might take time + + + +## Citation + +Please use the following citation: + +> **{{ ADD A CITATION }}** + + + +## Contributing + +All types of contributions are encouraged and valued. For more information, +check out our [Contributor Guidelines](https://github.com/{{github}}/{{project_name}}/blob/main/CONTRIBUTING.md). + +Please note that this project is released with a +[Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). +By contributing to this project, you agree to abide by its terms. + + + +## Acknowledgments + +**{{ OPTIONAL SECTION }}** + + + +## References + +**{{ OPTIONAL SECTION }}** diff --git a/inst/templates/README-pkg.Rmd b/inst/templates/README-pkg.Rmd index 0761fca..2f57483 100644 --- a/inst/templates/README-pkg.Rmd +++ b/inst/templates/README-pkg.Rmd @@ -21,7 +21,31 @@ knitr::opts_chunk$set(collapse = TRUE, -The goal of the R package `{{project_name}}` is to **{{ PLEASE ADD A FEW LINES }}** + +

+ • Overview
+ • Features
+ • Installation
+ • Get started
+ • Long-form documentations
+ • Citation
+ • Contributing
+ • Acknowledgments
+ • References +

+ + + +## Overview + + +The R package `{{project_name}}`... **{{ DESCRIBE YOUR PACKAGE }}** + + + +## Features + +The main purpose of `{{project_name}}` is to... **{{ DESCRIBE THE MAIN FEATURES }}** @@ -29,36 +53,69 @@ The goal of the R package `{{project_name}}` is to **{{ PLEASE ADD A FEW LINES } You can install the development version from [GitHub](https://github.com/) with: -```{r eval = FALSE} -# install.packages("remotes") +```{r eval=FALSE} +## Install < remotes > package (if not already installed) ---- +if (!requireNamespace("remotes", quietly = TRUE)) { + install.packages("remotes") +} + +## Install < {{project_name}} > from GitHub ---- remotes::install_github("{{github}}/{{project_name}}") ``` Then you can attach the package `{{project_name}}`: -```{r eval = FALSE} +```{r eval=FALSE} library("{{project_name}}") ``` -## Overview +## Get started + +For an overview of the main features of `{{project_name}}`, please read the +[Get started](https://{{github}}.github.io/{{project_name}}/articles/{{project_name}}.html) +vignette. -Here is an overview of `{{project_name}}` content: **{{ PLEASE ADD A FEW LINES }}** + + +## Long-form documentations + +`{{project_name}}` provides **{{ NUMBER OF VIGNETTES }}** vignettes to learn more about the package: + +- the [Get started](https://{{github}}.github.io/{{project_name}}/articles/{{project_name}}.html) +vignette describes the core features of the package +- **{{ LIST ADDITIONAL VIGNETTES }}** ## Citation -Please cite this package as: +Please cite `{{project_name}}` as: > {{family}} {{given}} (`r format(Sys.Date(), "%Y")`) {{project_name}}: An R -package to **{{ TITLE }}**. R package version {{pkg_version}}. +package to **{{ TITLE }}**. R package version {{pkg_version}}. + -## Code of Conduct +## Contributing + +All types of contributions are encouraged and valued. For more information, +check out our [Contributor Guidelines](https://github.com/{{github}}/{{project_name}}/blob/main/CONTRIBUTING.md). Please note that the `{{project_name}}` project is released with a -[Contributor Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). +[Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. + + + +## Acknowledgments + +**{{ OPTIONAL SECTION }}** + + + +## References + +**{{ OPTIONAL SECTION }}** diff --git a/inst/templates/compendium-sticker.png b/inst/templates/compendium-sticker.png new file mode 100644 index 0000000000000000000000000000000000000000..be4672186704cea23d400f3f0e24c417c8413db9 GIT binary patch literal 7377 zcmeHsc|4T++y96{MV5-1EOAh&Buk9_*jgA`P=q8oLSq@*u{M-Ja!O?#21k_aTbQA& zDaP1$YQ{1cG)8E~nCCNdzUTS<{(1g;{(SzJ*FE=rEuZ&wUGM9^t(LD-*9CNy4Vss-ob9vI^soO#bkv2c^ZsnG4LdT{1 z=vO1I9e(HJ_+DJZ{)R3S(1)1C%l`f;wd_RnT@l$^7vl^GW%07412l`C{hz*=ogTk* z+VmnpQE9L3(-^7W#9X>8f^^7|N#ggHO0t~ZElTU(817nLbg&81-qc+U=~-2(_H5W3 z8lMfCVu!qYSCn4k%?pvNxwNqh67^FM2DxEK=UV;Bp`5*IgM<!*!d3Np%B5?PO3)wV zh0n@v<|f+Z#z|zL=f@P!YI=uhrf;q9=+WM;GT)6{aytJ}R>OPzeyNLs!J5TH(3`j* zbMa|$(dmPtmTNC=PXGLaJbYJ-9kTZOHgz+?ANK+;8h2%qT5M>NxreSHVNoLU1&rbXFJjj)n(8$f_wQU6z zDZ8vIa>B0Prnk0j@h2von(I0*_KDkmL|@~OKP9_6x7z_mAz zm!aalUe&Y+)p^OyhgKxxBo>0n`_1~fQ6%Z^b|-pEd2|VT+q-qVme9(d&9KPqblPVq z7{8yPPGaT}tFQj0I910s)J@0lj}kk$sj=>#oluG(v?9zE4BWGXJntIFH8NM56!c%< z4@OzES$^ss-6|3BKRnoOTSXh-KihiYp2}|7>%K-wnmgAv#3VDBwHaHV>)gqYsE;A{ zPM)GzIii{JBxvRECrCAoKVx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