Skip to content

Commit

Permalink
docs: add DOI to CITATION
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Apr 11, 2023
1 parent 200584a commit 0f72cc5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,19 @@ bibentry(bibtype="Article",
year=2006,
url="https://igraph.org")

year <- sub("-.*", "", meta$Date)
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"))
authors <- paste(paste(head(authors, -1L), collapse = ", "), tail(authors, 1L), sep = " and ")
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")

0 comments on commit 0f72cc5

Please sign in to comment.