-
-
Notifications
You must be signed in to change notification settings - Fork 509
/
CITATION.Rmd
102 lines (79 loc) · 3.35 KB
/
CITATION.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
# CITATION
```{r, echo=FALSE, results="hide"}
eds <- personList(
person(given = "Ana Costa", family = "Conrado"),
person(given = "Auriel M.V.", family = "Fournier"),
person(given = "Brian", family = "Seok"),
person(given = "Francois", family = "Michonneau")
)
generate_citation <- function(authors = "AUTHORS",
editors = eds,
doi = "10.5281/zenodo.3264888") {
aut <- readLines(authors)
# remove first line
aut <- aut[-1]
aut <- as.person(aut)
bibentry(
bibtype = "Misc",
author = personList(aut),
title = "datacarpentry/R-ecology-lesson: Data Carpentry: Data Analysis and Visualization in R for Ecologists, June 2019",
editor = editors,
month = format(Sys.Date(), "%B"),
year = format(Sys.Date(), "%Y"),
url = "https://datacarpentry.org/R-ecology-lesson/",
doi = doi
)
}
generate_zenodo_json <- function(editors) {
tfile <- tempfile()
system(paste("git shortlog -n -e -s >", tfile))
aut <- read.table(file = tfile, sep = "\t")
aut <- as.person(aut[, 2])
pp <- lapply(aut, function(x) {
res <- gsub("^\\s", "", paste(paste(x$given, collapse = " "),
x$family))
list(name = res)
})
eds <- paste(editors$given, editors$family)
res <- list(creators = pp)
if (!is.null(editors)) {
ctb <- lapply(paste(editors$given, editors$family),
function(x)
list(type = "Editor", name = x))
res <- c(list(contributors = ctb), res)
}
cat(jsonlite::toJSON(res, auto_unbox = TRUE), file = ".zenodo.json")
}
system("update-copyright.py")
## generate_zenodo_json(editors = eds)
```
## Data
Data is from the paper S. K. Morgan Ernest, Thomas J. Valone, and James
H. Brown. 2009. Long-term monitoring and experimental manipulation of a
Chihuahuan Desert ecosystem near Portal, Arizona, USA. Ecology 90:1708.
[http://esapubs.org/archive/ecol/E090/118/](http://esapubs.org/archive/ecol/E090/118/)
A simplified version of this data, suitable for teaching is available on
[figshare](https://doi.org/10.6084/m9.figshare.1314459.v5).
## Lessons
The first workshop was run at NESCent on May 8-9, 2014 with the development and
instruction of lessons by Karen Cranston, Hilmar Lapp, Tracy Teal, and Ethan
White and contributions from Deb Paul and Mike Smorul.
Original materials adapted from SWC Python lessons by Sarah Supp. John Blischak
led the continued development of materials with contributions from Gavin
Simpson, Tracy Teal, Greg Wilson, Diego Barneche, Stephen Turner, and Karthik
Ram. This original material has been modified and expanded by François
Michonneau.
The **`dplyr`** lesson was created by Kara Woo, who copied and modified and
modified from Jeff
Hollister's [materials](https://usepa.github.io/introR/2015/01/14/03-Clean/).
The **`ggplot2`** lesson was initially created by Mateusz Kuzak, Diana Marek,
and Hedi Peterson, during a Hackathon in Espoo, Finland on March 16-17, 2015,
sponsored by the [ELIXIR project](https://elixir-europe.org/).
You can cite this Data Carpentry lesson as follow:
```{r, echo=FALSE, results="asis"}
print(generate_citation(), style = "html")
```
or as a BibTeX entry:
```{r, echo=FALSE, comment=""}
print(generate_citation(), style = "bibtex")
```