citHeader("In published work that uses or mentions NIMBLE, please cite the Journal of Computational and Graphical Statistics article. To cite a specific version of the package or to cite material from the manual, please cite the package itself or the manual. To help us track usage to justify funding support for NIMBLE please include the DOI in the citation. When citing the package or manual, please ask your publisher to make sure that the author is given as NIMBLE Development Team.")

year <- sub("-.*", "", meta$Date)
note <- sprintf("{R} package version %s", meta$Version)
noteManual <- sprintf("{R} package manual version %s", meta$Version)


bibentry(
 bibtype = "article",
 title = "Programming with models: writing statistical algorithms for general model structures with NIMBLE", 
 journal = "Journal of Computational and Graphical Statistics",
 volume = "26",
 issue = "2",
 pages = "403-413",
 year = "2017",
 author = c(person("P.", "de Valpine"),
            person("D.", "Turek"),
            person("C.J.", "Paciorek"),
            person("C.", "Anderson-Bergman"),
            person("D.", "Temple Lang"),
            person("R.", "Bodik")),
 doi = "10.1080/10618600.2016.1172487",
 textVersion = "de Valpine, P., D. Turek, C.J. Paciorek, C. Anderson-Bergman, D. Temple Lang, and R. Bodik. 2017. Programming with models: writing statistical algorithms for general model structures with NIMBLE. Journal of Computational and Graphical Statistics 26: 403-413. <DOI:10.1080/10618600.2016.1172487>."
)

bibentry(
 bibtype = "misc",
 title = "NIMBLE: MCMC, Particle Filtering, and Programmable Hierarchical Modeling",
 author = person(given = "NIMBLE Development Team"),
 url = "https://cran.r-project.org/package=nimble",
 year = year,
 version = meta$Version,
 note = note,
 doi = "10.5281/zenodo.1211190"
)

bibentry(
 bibtype = "misc",
 title = "NIMBLE User Manual",
 author = person(given = "NIMBLE Development Team"),
 url = "https://r-nimble.org",
 year = year,
 version = meta$Version,
 note = noteManual,
 doi = "10.5281/zenodo.1211190",
 textVersion = NULL
)


