year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date, perl = TRUE)
vers <- paste("R package version", meta$Version)
if (length(year) == 0) year = format(Sys.Date(), '%Y')
citHeader("When you use the RSiena package in publications,
            please cite the package and/or the manual:")


bibentry(bibtype = "Misc",
         title = meta$Title,
         author = Filter(function(p) 'aut' %in% p$role, as.person(meta$Author)),
         year = year,
         address = "Groningen, The Netherlands",
         organization = "University of Groningen",
         note = vers,
         url = meta$URL,
         textVersion =
            paste("Tom A.B. Snijders, Ruth M. Ripley, Krist Boitmanis,
            Christian Steglich, Nynke M.D. Niezink, Felix Schoenenberger, and Viviana Amati, ",
            year,
            ". RSiena - Simulation Investigation for Empirical Network Analysis, ",
            vers, ". ", meta$URL, sep="")
)

bibentry(bibtype = "Manual",
         title = "Manual for RSiena",
         author = c(as.person("Tom A.B. Snijders"),
                             as.person("Ruth Ripley"),
                             as.person("Zsofia B\'{o}da"),
                             as.person("Andr\'{a}s V\"{o}r\"{o}s"),
                             as.person("Paulina Preciado")
                             ),
         year = year,
         address = "Groningen, The Netherlands",
         organization = "University of Groningen",
         note = vers,
         url = meta$URL,
         textVersion =
         paste("Tom A.B. Snijders, Ruth Ripley, Zsofia Boda,
                           Andras Voros, and Paulina Preciado, ",
               year,
               ". Manual for RSiena. ",
               vers, ". ", meta$URL, sep="")
)
