if(!exists('meta') || is.null(meta)) meta <- packageDescription("LaplacesDemon")

year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date)
vers <- paste("R package version", meta$Version)
author <- "Statisticat, LLC." #as.personList(meta$Author)
url <- "https://web.archive.org/web/20150206004624/http://www.bayesian-inference.com/software"

citHeader(sprintf("To cite package '%s' in publications use:", meta$Package))

bibentry(bibtype ="Manual",
         author = author,
         year = year,
         title =sprintf("%s: %s", meta$Package, meta$Title),
         note = vers,
         url = url,
    	 publisher = "Bayesian-Inference.com",
    	 textVersion = sprintf("%s (%s). %s: %s. Bayesian-Inference.com. %s. [%s]", author, year, meta$Package, meta$Title, vers, url),
    	 header = "Technical documentation:"
)

bibentry(bibtype ="Manual",
         author = author,
         year = year,
         title = vign <- "Bayesian Inference",
         note = vers,
         url = url,
    	 publisher = "Bayesian-Inference.com",
    	 textVersion = sprintf("%s (%s). %s. Bayesian-Inference.com. %s. [%s]", author, year, vign, vers, url),
    	 header = "Vignette(s):"
)

bibentry(bibtype ="Manual",
         author = author,
         year = year,
         title = vign <- "LaplacesDemon Examples",
         note = vers,
         url = url,
    	 publisher = "Bayesian-Inference.com",
    	 textVersion = sprintf("%s (%s). %s. Bayesian-Inference.com. %s. [%s]", author, year, vign, vers, url),
    	 header = "Vignette(s):"
)

bibentry(bibtype ="Manual",
         author = author,
         year = year,
         title = vign <- "LaplacesDemon Tutorial",
         note = vers,
         url = url,
    	 publisher = "Bayesian-Inference.com",
    	 textVersion = sprintf("%s (%s). %s. Bayesian-Inference.com. %s. [%s]", author, year, vign, vers, url),
    	 header = "Vignette(s):"
)
