
year <- sub("-.*", "", meta$Date)
if(!length(year))
  year <- substr(Sys.Date(),1,4)
vers <- meta$Version
if(is.null(vers))
  vers <- packageVersion("dLagM")
vers <- paste("R package version", vers)

# Grab authors from DESCRIPTION file
# authors <- eval(parse(text=as.list(read.dcf("../DESCRIPTION")[1, ])$`Authors@R`))
# authors <- authors[sapply(authors$role, function(roles) "aut" %in% roles)]
# authors <- sapply(authors, function(author) paste(author$given, author$family))
# authors <- paste(authors, collapse = " and ")

citHeader("The citation for the dLagM package in publications:")

bibentry(bibtype = "Article",
  title     = "{dLagM}: An {R} package for distributed lag models and {ARDL} bounds testing",
  author    = personList(as.person("Haydar Demirhan")),
  journal   = "PLoS ONE",
  volume    =  15,
  number    =  2,
  pages     = "e0228812",
  year      =  2020,
  url       = "https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0228812")
