citHeader("To cite package vcd in publications use:")

## R >= 2.8.0 passes package metadata to citation().
if(!exists("meta") || is.null(meta)) meta <- packageDescription("vcd")

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

citEntry(entry="Manual",
         title = "vcd: Visualizing Categorical Data",
         author = personList(as.person("David Meyer"),
			     as.person("Achim Zeileis"),
	                     as.person("Kurt Hornik")),
         year = year,
         note = vers,
         
         textVersion =
         paste("David Meyer, Achim Zeileis, and Kurt Hornik (", year,
               "). vcd: Visualizing Categorical Data. ",
               vers, ".", sep=""))

citEntry(entry="Article",
	 header="To cite the strucplot framework (e.g., functions mosaic(), sieve(), assoc(), strucplot(), structable(), pairs.table(), cotabplot(), doubledecker()), additionally use:",
         title = "The Strucplot Framework: Visualizing Multi-Way Contingency Tables with vcd",
         author = personList(as.person("David Meyer"),
			     as.person("Achim Zeileis"),
	                     as.person("Kurt Hornik")),
         journal      = "Journal of Statistical Software",
         year         = "2006",
	 volume       = "17",
	 number       = "3",
	 pages        = "1--48",
         url          = "http://www.jstatsoft.org/v17/i03/",
         
         textVersion = 
         paste("David Meyer, Achim Zeileis, and Kurt Hornik (2006).", 
               "The Strucplot Framework: Visualizing Multi-Way Contingency Tables with vcd.",
               "Journal of Statistical Software, 17(3), 1-48.",
	       "URL http://www.jstatsoft.org/v17/i03/")
)

citEntry(entry="Article",
	 header="If you use the residual-based shadings (in mosaic() or assoc()), please cite:",
         title = "Residual-based Shadings for Visualizing (Conditional) Independence",
         author = personList(as.person("Achim Zeileis"),
	                     as.person("David Meyer"),
			     as.person("Kurt Hornik")),
         journal      = "Journal of Computational and Graphical Statistics",
         year         = "2007",
	 volume       = "16",
	 number       = "3",
	 pages        = "507--525",
         
         textVersion = 
         paste("Achim Zeileis, David Meyer, and Kurt Hornik (2007).", 
               "Residual-based Shadings for Visualizing (Conditional) Independence.",
               "Journal of Computational and Graphical Statistics, 16(3), 507-525.")
)
