-
Notifications
You must be signed in to change notification settings - Fork 8
/
README.Rmd
174 lines (112 loc) · 5.66 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
rcompendium <img src="man/figures/logo.png" align="right" style="float:right; height:120px;"/>
=========================================================
<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/rcompendium)](https://CRAN.R-project.org/package=rcompendium/)
[![R CMD check](https://github.com/FRBCesab/rcompendium/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/FRBCesab/rcompendium/actions/workflows/R-CMD-check.yaml)
[![Website deployment](https://github.com/FRBCesab/rcompendium/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/FRBCesab/rcompendium/actions/workflows/pkgdown.yaml)
[![codecov](https://codecov.io/gh/FRBCesab/rcompendium/branch/main/graph/badge.svg)](https://app.codecov.io/gh/FRBCesab/rcompendium)
[![License: GPL (>= 2)](https://img.shields.io/badge/License-GPL%20%28%3E%3D%202%29-blue.svg)](https://choosealicense.com/licenses/gpl-2.0/)
<!-- badges: end -->
In the area of open science, making reproducible analyses is a strong prerequisite.
But sometimes it is difficult 1) to find the good structure to organize files
and 2) to set up the whole project. The aim of the package `rcompendium` is to
make easier the creation of R package/research compendium (i.e. a predefined
files/folders structure) so that users can focus on the code/analysis instead of
wasting time organizing files.
A full ready-to-work structure will be set up with the following features:
- Initialization of version control with [git](https://git-scm.com/).
- Creation of a minimal R package structure (`DESCRIPTION` and `NAMESPACE` files,
and `R/` and `man/` folders).
- Creation of additional files (`LICENSE.md`, `inst/CITATION`, etc.).
- Creation of a _Get started_ vignette in `vignettes/` (package only).
- Setting the units tests process in `tests/`.
- Creation of a `README.Rmd` with HexSticker (template) and badges.
- Autocompletion of maintainer information.
- Initialization of the `renv` system (if required).
- Creation of a Dockerfile (if required).
- Creation of a GitHub repository.
- Configuration of GitHub Actions to automatically:
- check and test package (`R CMD Check`);
- report the code coverage (`covr`);
- build and deploy website (`pkgdown`);
- render `README.md`.
This package heavily relies on the R packages
[`devtools`](https://devtools.r-lib.org) and
[`usethis`](https://usethis.r-lib.org) and follows recommendations made by
[Hadley Wickham & Jenny Bryan](https://r-pkgs.org) and
[Ben Marwick](https://peerj.com/preprints/3192/).
## Installation
You can install the stable version from [CRAN](https://cran.r-project.org/) with:
```{r eval=FALSE}
## Install stable version of < rcompendium > from CRAN ----
install.packages("rcompendium")
```
Or you can install the development version from [GitHub](https://github.com/) with:
```{r eval=FALSE}
## Install < remotes > package (if not already installed) ----
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
## Install dev version of < rcompendium > from GitHub ----
remotes::install_github("FRBCesab/rcompendium")
```
**Note:** On Unix system you may have an error during the installation linked
to the [**V8 JavaScript engine**](https://v8.dev/). This software is required
by the R package [`cffr`](https://docs.ropensci.org/cffr/)
(included in `rcompendium`). Run the following line and try to reinstall `rcompendium`.
```{r eval=FALSE}
## Fix V8 issues ----
Sys.setenv(DOWNLOAD_STATIC_LIBV8 = 1)
## Install < rcompendium > ----
install.packages("rcompendium")
```
## Usage
Please read the
[Get started](https://frbcesab.github.io/rcompendium/articles/rcompendium.html) vignette
and pay attention to the sections
[Prerequisites](https://frbcesab.github.io/rcompendium/articles/rcompendium.html#prerequisites) and
[Usage](https://frbcesab.github.io/rcompendium/articles/rcompendium.html#usage)
Others available vignettes:
- [Developing a Package](https://frbcesab.github.io/rcompendium/articles/developing_a_package.html)
- [Working with a Compendium](https://frbcesab.github.io/rcompendium/articles/working_with_a_compendium.html)
## Citation
Please cite this package as:
> Casajus N. (2023) rcompendium: An R package to create a package or research
compendium structure. Version 1.3, https://github.com/FRBCesab/rcompendium.
You can also run:
```{r eval=FALSE}
citation("rcompendium")
## A BibTeX entry for LaTeX users is:
##
## @Manual{,
## title = {{rcompendium}: {An} {R} package to create a package or research compendium structure},
## author = {{Casajus N.}},
## year = {2023},
## note = {R package version 1.3},
## url = {https://github.com/FRBCesab/rcompendium},
## }
```
## Contributing
All types of contributions are encouraged and valued. For more information,
check out our [Contribution Guidelines](https://github.com/FRBCesab/rcompendium/blob/main/CONTRIBUTING.md).
Please note that the `rcompendium` 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.
## Colophon
This package is the result of intense discussions and feedbacks from the training
course [Reproducible Research in Computational Ecology](https://rdatatoolbox.github.io/).
`rcompendium` is largely inspired by the package
[`rrtools`](https://github.com/benmarwick/rrtools) developed by
[Ben Marwick _et al._](https://github.com/benmarwick) and tries to respect the standard
defined by the community.