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

year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date, perl = TRUE)
vers <- paste("R package version", meta$Version)

bibentry(
  bibtype      = "Manual",
  title        = "ICCbin: Facilitates Clustered Binary Data Generation, and Estimation of Intracluster Correlation Coefficient (ICC) for Binary Data",
  author       = c(person("Akhtar", "Hossain"), person("Hrishikesh", "Chakraborty")),
  note         = vers,
  year         = year,
  url          = "https://CRAN.R-project.org/package=ICCbin",
  header       = paste("To cite package", sQuote(meta$Package), "in publications use:"),
  textVersion  =
    paste0("Hossain, A., & Chakraborty, H. (", year, ").",
          " ICCbin: Facilitates Clustered Binary Data Generation, and Estimation of Intracluster Correlation Coefficient (ICC) for Binary Data.",
          " ", vers, ".",
          " URL https://CRAN.R-project.org/package=ICCbin.")
)

bibentry(
  bibtype      = "Article",
  title        = "R package to Estimate Intracluster Correlation Coefficient with Confidence Interval for Binary Data",
  author       = c(person("Hrishikesh", "Chakraborty"), person("Akhtar", "Hossain")),
  journal      = "Computer Methods and Programs in Biomedicine",
  year         = "2018",
  volume       = "155",
  pages        = "85--92",
  url          = "https://www.sciencedirect.com/science/article/pii/S0169260717305771",
  footer       = "A BibTeX entry for LaTeX users is toBibtex(citation('ICCbin'))",
  textVersion  =
    paste("Chakraborty, H., & Hossain, A. (2018).",
          "R package to Estimate Intracluster Correlation Coefficient with Confidence Interval for Binary Data.",
          "Computer Methods and Programs in Biomedicine, 155, 85-92.",
          "URL https://www.sciencedirect.com/science/article/pii/S0169260717305771.")
)
