diff --git a/R/epidist.R b/R/epidist.R index 4945637fd..81ce44b90 100644 --- a/R/epidist.R +++ b/R/epidist.R @@ -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( diff --git a/R/epidist_utils.R b/R/epidist_utils.R index 1f71e2ab9..3683da024 100644 --- a/R/epidist_utils.R +++ b/R/epidist_utils.R @@ -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) } diff --git a/man/epidist.Rd b/man/epidist.Rd index 5df61f586..00afd56ea 100644 --- a/man/epidist.Rd +++ b/man/epidist.Rd @@ -146,7 +146,9 @@ ebola_incubation <- epidist( ), 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(