Skip to content

Commit

Permalink
updated create_epidist_citation example in epidist doc
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Sep 5, 2023
1 parent 6513047 commit b6d9780
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion R/epidist.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ new_epidist <- function(disease = list(),
#' ),
#' citation = create_epidist_citation(
#' author = "Smith_etal",
#' year = 2010,
#' year = 2002,
#' title = "COVID-19 incubation period",
#' journal = "Epi Journal",
#' DOI = "10.19832/j.1366-9516.2012.09147.x"
#' ),
#' metadata = create_epidist_metadata(
Expand Down
2 changes: 1 addition & 1 deletion R/epidist_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ create_epidist_citation <- function(author = NA_character_,

if (!inherits(author, "person")) {
# imperfect solution as library currently only has first author
author_names <- unlist(strsplit(x = author, split = "_", fixed = TRUE))
author_names <- strsplit(x = author, split = "_", fixed = TRUE)
authors <- lapply(author_names, utils::as.person)
authors <- Reduce(c, authors)
}
Expand Down
4 changes: 3 additions & 1 deletion man/epidist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b6d9780

Please sign in to comment.