# Grab the version and date from the DESCRIPTION file
if(!exists("meta") || is.null(meta)) meta <- packageDescription("coarseDataTools")
year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date)
vers <- paste("R package version", meta$Version)


citHeader("To cite the R package 'coarseDataTools' in publications use:")

bibentry(bibtype  = "Article",
         title    = "Estimating incubation periods with coarse data.",
         author   = c(person(c("Nicholas G"), "Reich"),
                   person(c("Justin"), "Lessler"),
                   person(c("Derek AT"), "Cummings"),
                   person(c("Ron"), "Brookmeyer")),
         journal  = "Statistics in Medicine",
         year     = 2009,
         textVersion = "Reich NG, Lessler J, Cummings DAT, Brookmeyer R. (2009). Estimating incubation periods with coarse data. Statistics in Medicine. 28(22):2769--2784.")


bibentry(bibtype  = "Article",
         title    = "Estimating absolute and relative case fatality ratios from infectious disease surveillance data.",
         author   = c(person(c("Nicholas G"), "Reich"),
                   person(c("Justin"), "Lessler"),
                   person(c("Derek AT"), "Cummings"),
                   person(c("Ron"), "Brookmeyer")),
         journal  = "Biometrics",
         year     = 2012,
         textVersion = "Reich NG, Lessler J, Cummings DAT, Brookmeyer R. Estimating absolute and relative case fatality ratios from infectious disease surveillance data. Biometrics. 2012, 68(2): 598--606.")


bibentry(bibtype  = "Manual",
         title    = "coarseDataTools: A collection of functions to help with analysis of coarsely observed data",
         author   = c(person(c("Nicholas G"), "Reich"),
                   person(c("Justin"), "Lessler"),
                   person(c("Andrew S"), "Azman")),
         year     = year,
         note     = vers,
         url      = meta$URL,
         textVersion = paste0("Reich NG, Lessler J, Azman AS. (", year, "). coarseDataTools: A collection of functions to help with analysis of coarsely observed data. <", meta$URL, ">. ", vers, "."))