-
-
Notifications
You must be signed in to change notification settings - Fork 203
/
Copy pathCITATION
47 lines (42 loc) · 1.54 KB
/
CITATION
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
bibentry(bibtype="Article",
header="To cite 'igraph' in publications use:",
title="The igraph software package for complex network research",
author=c(as.person("Gabor Csardi"), as.person("Tamas Nepusz")),
journal="InterJournal",
volume="Complex Systems",
pages="1695",
year=2006,
url="https://igraph.org")
note <- sprintf("R package version %s", meta$Version)
# https://github.com/cran/lidR/blob/f0dae39007c9d174f6e1962ff236fd8826f1501d/inst/CITATION#L21
year <- format(Sys.Date(), "%Y")
authors <- meta$`Authors@R`
authors <- utils:::.read_authors_at_R_field(authors)
authors <- Filter(function(e) {
!(is.null(e$given) && is.null(e$family)) && !is.na(match("aut", e$role))
}, authors)
authors <- format(authors, include = c("given", "family"))
# Step 1: Get text citation and replace there the abb.
entry_for_txt <- format(bibentry(
bibtype = "Manual",
title = "{igraph}: Network Analysis and Visualization in R",
author = authors,
year = year,
note = note,
doi = "10.5281/zenodo.7682609",
url = "https://CRAN.R-project.org/package=igraph"
), style = "text")
txt <- gsub("Horvát S", "Horvát Sz", entry_for_txt)
# FIXME: \relax brings CRAN trouble
# aut_new <- sub("Szabolcs", "{\\\\relax Sz}abolcs", authors)
aut_new <- authors
bibentry(
bibtype = "Manual",
title = "{igraph}: Network Analysis and Visualization in R",
author = aut_new,
year = year,
note = note,
doi = "10.5281/zenodo.7682609",
url = "https://CRAN.R-project.org/package=igraph",
textVersion = txt
)