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("spatPomp"),
      "package in publications, please use:"),
    bibtype = "article",
    title = "spatPomp: An R package for spatiotemporal partially observed Markov process models",
    author = c(
      person(given = "Kidus", family = "Asfaw"),
      person(given = "Joonha", family = "Park"),
      person(given = "Aaron A.", family = "King"),
      person(given = "Edward", family = "Ionides",
        email = "ionides@umich.edu")
    ),
    year="2024",
    journal="Journal of Open Source Software",
    volume="9",
    pages="7008"
  ),
  bibentry(
    header="To cite the package itself:",
    bibtype="Manual",
    title="{spatPomp}: {Statistical} Inference for Spatiotemporal Partially Observed {Markov} Processes",
    author=c(
      person(given = "Kidus", family = "Asfaw"),
      person(given = "Joonha", family = "Park"),
      person(given = "Aaron A.", family = "King"),
      person(given = "Edward", family = "Ionides",
	email = "ionides@umich.edu")
    ),
    year=year,
    note=note1,
    url=meta$URL,
    textVersion=paste0(
      "Asfaw K., Park J., A. A. King, E. L. Ionides"," (",year,") ",
      "spatPomp: Statistical Inference for Spatiotemporal Partially Observed Markov Processes ",
       note2,". ",meta$URL
    )
  )
)

