forked from Milano-R/erum2020-covidr-contest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
61 lines (51 loc) · 1.59 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
---
output: github_document
################################################################################
# NOTE:
# Make sure you have added an executable pre-commit hook in your local checkout
# .git/hooks/pre-commit
# to prevent accidental commits of README.Rmd not re-knitted to README.md.
# If not, you can copy the hook from inst/tools
# $ cp _tools/pre-commit .git/hooks
################################################################################
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
submit_link <- "#submit-a-contribution"
```
# e-Rum2020 CovidR Contest
```{r child='_fragments/covidr-intro.Rmd'}
```
## Submit a contribution
```{r, echo = FALSE, results = 'asis', warning = FALSE}
# updated the example yaml chunk in the issue template and CONTRIBUTING
example_yaml <- readLines("contest/contributions/.example.yml")
contributing <- "CONTRIBUTING.md"
issue_tpl <- ".github/ISSUE_TEMPLATE/submit-a-contribution.md"
.replace_yaml <- function(file) {
txt <- readLines(file)
txt_yaml <- c(
head(grep("^```\\s*yaml", txt), 1L) + 1L,
head(grep("^```$", txt), 1L) - 1L
)
txt <- c(
head(txt, txt_yaml[1] - 1),
example_yaml,
tail(txt, -txt_yaml[2])
)
writeLines(txt, file)
}
.replace_yaml(contributing)
.replace_yaml(issue_tpl)
cat(knitr::knit(quiet = TRUE, text = readLines(contributing)[-1L]))
```
---
## Code of Conduct
```{r, echo = FALSE, results = 'asis', warning = FALSE}
cat(knitr::knit(quiet = TRUE, text = readLines("CODE_OF_CONDUCT.md")[-1]))
```