

year <- ifelse("Date" %in% names(meta), sub("-.*", "", meta$Date), format(Sys.Date(), "%Y"))
note <- sprintf("R package version %s", meta$Version)

bibentry(
  bibtype = "manual",
  title   = "{fundiversity}: Easy Computation of Functional Diversity Indices",
  author  = c(person("Matthias", "Grenié"),
              person("Hugo", "Gruson")),
  year    = year,
  note    = note,
  header  = "To cite this package in publications, please use:",
  url     = "https://CRAN.R-project.org/package=fundiversity",
  doi     = "10.5281/zenodo.4761754")

bibentry(
  bibtype = "manual",
  title   = "{fundiversity}: Easy Computation of Functional Diversity Indices",
  author  = c(person("Matthias", "Grenié"),
              person("Hugo", "Gruson")),
  year    = year,
  note    = note,
  header  = "To cite the development version, please use:",
  url     = "https://github.com/funecology/fundiversity",
  doi     = "10.5281/zenodo.4761754")
