-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
74 lines (51 loc) · 2.97 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
---
title: "Project name"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# What is this project about?
summarize in three sentences what this project is about and what central features it has.
# Setup
## `renv`: Installing Packages
`renv` brings project-local R dependency management to our project. `renv` uses a lockfile (`renv.lock`) to capture the state of your library at some point in time.
Based on `renv.lock`, RStudio should automatically recognize that it's being needed, thereby downloading and installing the appropriate version of `renv` into the project library. After this has completed, you can then use `renv::restore()` to restore the project library locally on your machine.
When new packages are used, `install.packages()` does not install packages globally, it does in an environment only used for our project. You can find this library in `renv/library` (but it should not be necessary to look at it).
If `renv` fails, you will be presented something in the like of when you first start R after cloning the repo:
```
renv::restore()
This project has not yet been activated. Activating this project will ensure the project library is used during restore. Please see ?renv::activate for more details. Would you like to activate this project before restore? [Y/n]:
```
Follow along with `Y` and `renv::restore()` will do its work downloading and installing all dependencies.
`renv` uses a local `.Rprofile` and `renv/activate.R` script to handle our project dependencies.
### Adding a new package
If you need to add a new package, you can install it as usual (`install.packages` etc.).
Then, to add your package to the `renv.lock`:
```
renv::snapshot()
```
and commit and push your `renv.lock`.
Other team members can then run `renv::restore()` to install the added package(s) on their laptop.
## Data
You need the following data files in order to run this project:
```{r}
system2("tree", c("data/raw")) # works on mac and potentially linux.
```
# Developer information
[the following can also be moved to the wiki if you decide to have one]
## Definition of Done
Default Definition of Done can be found [here](https://github.com/CorrelAid/definition-of-done). Adapt if needed.
## Code styling
# How to operate this project?
[the following can also be moved to the wiki if you decide to have one]
explain how the output(s) of this project can be handled/operated, for example:
- how to knit the report(s)
- where to create/find the data visualizations
- how to update data
- what would need to be updated if someone wanted to re-run your analysis with different data
# Limitations
be honest about the limitations of your project, e.g.:
- methodological: maybe another model would be more suitable?
- reproducibility: what are limits of reproducibility? is there something hard-coded/specific to the data that you used?
- best practices: maybe some code is particularly messy and people working on it in the future should know about it in advance?