if(!exists("meta") || is.null(meta)) meta <- packageDescription("DEoptim")
year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date)
vers <- paste("version", meta$Version)

citHeader("To cite 'DEoptim' in publications use:")

citEntry(entry = "manual",
	 title = "{DEoptim}: Differential Evolution in {R}",
	 author = personList(as.person("David Ardia"),
                         as.person("Katharine M. Mullen"),
                         as.person("Brian G. Peterson"), 
                         as.person("Joshua Ulrich")),
     year = year,
	 note = vers,
	 url = "https://CRAN.R-project.org/package=DEoptim",
	 textVersion =
         paste("David Ardia, Katharine M. Mullen, Brian G. Peterson, Joshua Ulrich (", year,"). ",
               "'DEoptim': Differential Evolution in 'R'. ", vers, ".", sep = "")
)

citEntry(entry = "article",
  title        = "{DEoptim}: An {R} Package for Global Optimization by Differential Evolution",
  author       = personList(as.person("Katharine Mullen"),
                   as.person("David Ardia"),
                   as.person("David Gil"),
                   as.person("Donald Windover"),
                   as.person("James Cline")),
  journal      = "Journal of Statistical Software",
  year         = "2011",
  volume       = "40",
  number       = "6",
  pages        = "1--26",
  url          = "http://www.jstatsoft.org/v40/i06/",
  textVersion  =
  paste("Katharine Mullen, David Ardia, David Gil, Donald Windover, James Cline (2011).",
        "'DEoptim': An R Package for Global Optimization by Differential Evolution.",
        "Journal of Statistical Software, 40(6), 1-26.",
        "URL http://www.jstatsoft.org/v40/i06/.")
)

citEntry(entry = "article",
	 title = "{D}ifferential {E}volution with {DEoptim}: An Application to Non-Convex Portfolio Optimization",
	 author = personList(as.person("David Ardia"),
                         as.person("Kris Boudt"),
                         as.person("Peter Carl"),
                         as.person("Katharine M. Mullen"),
                         as.person("Brian G. Peterson")),
         journal      = "The R Journal",
  		 year         = "2011",
         volume       = "3",
         number       = "1",
         pages        = "27--34",
         url          = "https://journal.r-project.org/archive/2011-1/RJournal_2011-1_Ardia~et~al.pdf",
         textVersion = 
         paste("Ardia, D., Boudt, K., Carl, P., Mullen, K.M., Peterson, B.G. (2010).",
               "Differential Evolution with 'DEoptim': An Application to Non-Convex Portfolio Optimization.",
               "The R Journal, 3(1), 27-34.",
               "URL https://journal.r-project.org/archive/2011-1/RJournal_2011-1_Ardia~et~al.pdf")
)

citEntry(entry = "article",
	 title = "{J}ump-Diffusion Calibration using {D}ifferential {E}volution",
	 author = personList(as.person("David Ardia"),
                         as.person("Juan Ospina Arango"),
                         as.person("Norman Giraldo Gomez")),
         journal      = "Wilmott Magazine",
  		 year         = "2011",
         volume       = "55",
         pages        = "76--79",
         url          = "http://www.wilmott.com/",
         textVersion = 
         paste("Ardia, D., Ospina Arango, N., Giraldo Gomez, N. (2010).",
               "Jump-Diffusion Calibration using Differential Evolution.",
               "Wilmott Magazine, Issue 55 (September), 76-79.", 
               "URL http://www.wilmott.com/.")	       
)

citEntry(entry = "Book",
         title = "{D}ifferential {E}volution - A Practical Approach to Global Optimization",
         author = personList(as.person("Kenneth V. Price"),
                             as.person("Rainer M. Storn"),
                             as.person("Jouni A. Lampinen")),
         publisher = "Springer-Verlag",
         series = "Natural Computing",
         month = "January",
         year = "2006",
         note = "ISBN 540209506",
         textVersion =
         paste("Kenneth V. Price, Rainer M. Storn and Jouni A. Lampinen (2006).",
               "Differential Evolution - A Practical Approach to Global Optimization.",
               "Berlin Heidelberg: Springer-Verlag. ISBN 3540209506."),
         header = "To cite the Differential Evolution algorithm use:"
)

citFooter("BibTeX entries for LaTeX users: use\n", 
sQuote('toBibtex(citation("DEoptim"))'))

