year <- sub("-.*", "", meta$Date)
note1 <- sprintf("{R}~package, version~%s", meta$Version)
note2 <- sprintf("(R package, version %s)", meta$Version)

c(
  bibentry(
    header=paste("To cite the",sQuote("panelPomp"),"package in publications, use:"),
    bibtype = "Article",
    title = "Panel Data Analysis via Mechanistic Models",
    author=c(
      as.person("Carles Bret\\'o"),
      as.person("Aaron A. King"),
      as.person("Edward L. Ionides")
    ),
    journal="Journal of the American Statistical Association",
    year="2020",
    volume="115",
    number="531",
    pages="1178--1188",
    doi="10.1080/01621459.2019.1604367",
    textVersion=paste(
      "C. Bretó, E. L. Ionides and A. A. King (2020).",
      "Panel Data Analysis via Mechanistic Models.",
      "Journal of the American Statistical Association 115(531): 1178–1188.",
      "DOI:10.1080/01621459.2019.1604367."
    )
  ),
  bibentry(
    header="Additionally, consider citing the package itself:",
    bibtype="Manual",
    title="{panelPomp}: {Inference} for Panel Partially Observed {Markov} Processes",
    author=c(
      as.person("Carles Bret\\'o"),
      as.person("Jesse Wheeler"),
      as.person("Edward L. Ionides"),
      as.person("Aaron A. King")
    ),
    year=year,
    note=note1,
    url=meta$URL,
    textVersion=paste0(
      "C. Bretó, J. Wheeler, E. L. Ionides and A. A. King"," (",year,"). ",
      "panelPomp: Statistical Inference for Partially Observed Markov Processes. ",
      note2,". ",meta$URL
    )
  )
)
