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

citEntry(entry = "manual",
	 title = "The {DEoptim} Package: {D}ifferential {E}volution Optimization in {R}",
     author = personList(as.person("David Ardia"), 
                             as.person("Katharine Mullen"), 
                             as.person("Brian G. Peterson"),
                             as.person("Joshua Ulrich")),
     year = year,
	 note = vers,
	 url = "http://CRAN.R-project.org/package=DEoptim",
	 textVersion =
         paste("Ardia, D., Mullen, K.M., et.al. (", year,"). ",
               "The 'DEoptim' Package: Differential Evolution Optimization in 'R'. ", vers, ".", sep = ""), 
     header = "To cite the 'DEoptim' in publications use:"
     
)

citEntry(entry = "misc",
	 title = "{DEoptim}: An {R} Package for Global Optimization by {D}ifferential {E}volution",
	 author = personList(person("Katharine","Mullen","M."),
                         person("David","Ardia"),
                         person("David","Gil","L."),
                         person("Donald","Windover"),
                         person("James","Cline")),
         year = "2009",
         url = "http://ssrn.com/abstract=1526466",
	 textVersion =
         paste("Mullen, K.M., Ardia, D., Gil, D.L., Windover, D., Cline, J. (2009).",
               "'DEoptim': An 'R' Package for Global Optimization by Differential Evolution.",
               "URL http://ssrn.com/abstract=1526466.")
)

citEntry(entry = "misc",
	 title = "{D}ifferential {E}volution ({DEoptim}) for Non-Convex Portfolio Optimization",
	 author = personList(person("David","Ardia"),
                         person("Kris","Boudt"),
                         person("Peter","Carl"),
                         person("Katharine","Mullen","M."),
                         person("Brian","Peterson","G.")),
         year = "2010",
         url = "http://ssrn.com/abstract=1584905",
         textVersion = 
         paste("Ardia, D., Boudt, K., Carl, P., Mullen, K.M., Peterson, B.G. (2010).",
               "Differential Evolution ('DEoptim') for Non-Convex Portfolio Optimization.",
               "URL http://ssrn.com/abstract=1584905.")
)

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:"
)
