## R >= 2.8.0 passes package metadata to citation().
if(!exists("meta") || is.null(meta)) meta <- packageDescription("fxregime")
year <- sub("-.*", "", meta$Date)
note <- sprintf("R package version %s", meta$Version)

bibentry(bibtype = "Manual",
         title   = "fxregime: Exchange Rate Regime Analysis",
         author  = c(person("Achim", "Zeileis"), person("Ajay", "Shah"), person("Ila", "Patnaik")),
         year    = year,
         note    = note,
	 url     = "https://CRAN.R-project.org/package=fxregime",
         doi     = "10.32614/CRAN.package.fxregime",
         header  = "To cite fxregime in publications use:"
)

bibentry(bibtype = "Article",
         title   = "Testing, Monitoring, and Dating Structural Changes in Exchange Rate Regimes",
         author  = c(person("Achim", "Zeileis"), person("Ajay", "Shah"), person("Ila", "Patnaik")),
         journal = "Computational Statistics \\& Data Analysis",
         year    = "2010",
	 volume  = "54",
	 number  = "6",
	 pages   = "1696--1706",
	 doi     = "10.1016/j.csda.2009.12.005",
	 header  = "For the underlying methods, please cite:"
)
