Skip to content

Commit

Permalink
style: update README templates - fix #40
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Oct 23, 2023
1 parent b4f7f00 commit 0d791ae
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 39 deletions.
103 changes: 74 additions & 29 deletions inst/templates/README-comp.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,67 +14,112 @@ knitr::opts_chunk$set(collapse = TRUE,



# {{project_name}}

{{project_name}} <img src="man/figures/compendium-sticker.png" align="right" style="float:right; height:120px;"/>
=========================================================

<!-- badges: start -->
<!-- badges: end -->


Research Compendium of the project **{{ PLEASE ADD A FEW WORDS }}**

<p align="left">
• <a href="#overview">Overview</a><br>
• <a href="#features">Features</a><br>
• <a href="#content">Content</a><br>
• <a href="#installation">Installation</a><br>
• <a href="#usage">Usage</a><br>
• <a href="#citation">Citation</a><br>
• <a href="#contributing">Contributing</a><br>
• <a href="#acknowledgments">Acknowledgments</a><br>
• <a href="#references">References</a>
</p>


### 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 }}**
77 changes: 67 additions & 10 deletions inst/templates/README-pkg.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,101 @@ knitr::opts_chunk$set(collapse = TRUE,
<!-- badges: end -->


The goal of the R package `{{project_name}}` is to **{{ PLEASE ADD A FEW LINES }}**

<p align="left">
• <a href="#overview">Overview</a><br>
• <a href="#features">Features</a><br>
• <a href="#installation">Installation</a><br>
• <a href="#get-started">Get started</a><br>
• <a href="#long-form-documentations">Long-form documentations</a><br>
• <a href="#citation">Citation</a><br>
• <a href="#contributing">Contributing</a><br>
• <a href="#acknowledgments">Acknowledgments</a><br>
• <a href="#references">References</a>
</p>



## Overview


The R package `{{project_name}}`... **{{ DESCRIBE YOUR PACKAGE }}**



## Features

The main purpose of `{{project_name}}` is to... **{{ DESCRIBE THE MAIN FEATURES }}**



## Installation

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}}.
<https://github.com/{{github}}/{{project_name}}/>



## 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 }}**
Binary file added inst/templates/compendium-sticker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0d791ae

Please sign in to comment.