# Encoding: UTF-8

year <- if (!is.null(meta$Date) && !is.na(meta$Date)) {
  sub("-.*", "", meta$Date)
} else {
  format(Sys.Date(), "%Y")
}

vers <- if (!is.null(meta$Version) && !is.na(meta$Version)) {
  meta$Version
} else {
  "unknown"
}

bibentry(
  bibtype = "Manual",
  title = "GeDS: Geometrically Designed Spline Regression",
  author = c(
    person("Dimitrina S.", "Dimitrova"),
    person("Vladimir K.", "Kaishev"),
    person("Andrea", "Lattuada"),
    person("Emilio L.", "Sáenz Guillén"),
    person("Richard J.", "Verrall")
  ),
  year = year,
  note = paste("R package version", vers),
  doi = "10.32614/CRAN.package.GeDS",
  url = "https://CRAN.R-project.org/package=GeDS",
  header = "To cite the package 'GeDS' in publications, please use:",
  textVersion = paste(
    "Dimitrova, D. S., Kaishev, V. K., Lattuada, A., Sáenz Guillén, E. L., and Verrall, R. J. (",
    year, "). GeDS: Geometrically Designed Spline Regression. ",
    "R package version ", vers, ", https://CRAN.R-project.org/package=GeDS.", sep = ""
  )
)

citFooter('\nUse ', sQuote('toBibtex(citation("GeDS"))'), ' to extract BibTeX references.')


