

local({
    title <- paste0("{", meta$Package, "}: ", meta$Title)

    authors <- eval(parse(text = meta[["Authors@R"]]))
    authors <- authors[sapply(authors, function (pers) "aut" %in% pers$role)]

    mheader <- "To cite package 'lmSubsets' in publications use:"

    biblio <- c(
        bibentry(
            bibtype = "Manual",
            title   = title,
            author  = authors,
            year    = format(as.Date(meta$Date), "%Y"),
            note    = paste0("R package version ", meta$Version),
            url     = "https://CRAN.R-project.org/package=lmSubsets"
        ),

        bibentry(
            bibtype = "Article",
            title   = paste0(title, " for {R}"),
            author  = c(
                person(
                    given = "Marc",
                    family = "Hofmann",
                    email = "marc.hofmann@gmail.com"
                ),
                person(
                    given = "Cristian",
                    family = "Gatu"
                ),
                person(
                    given = c("Erricos", "J."),
                    family = "Kontoghiorghes"
                ),
                person(
                    given = "Ana",
                    family = "Colubi"
                ),
                person(
                    given = "Achim",
                    family = "Zeileis"
                )
            ),
            journal = "Journal of Statistical Software",
            year    = "2020",
            volume  = "93",
            number  = "3",
            pages   = "1--21",
            doi     = "10.18637/jss.v093.i03"
        ),

        bibentry(
            bibtype = "Article",
            title   = paste(
                "Efficient algorithms for computing",
                "the best subset regression models",
                "for large-scale problems"
            ),
            author  = c(
                person(
                    given = "Marc",
                    family = "Hofmann"
                ),
                person(
                    given = "Cristian",
                    family = "Gatu"
                ),
                person(
                    given = c("Erricos", "J."),
                    family = "Kontoghiorghes"
                )
            ),
            journal = "Computational Statistics & Data Analysis",
            year    = "2007",
            volume  = "52",
            pages   = "16-29",
            doi     = "10.1016/j.csda.2007.03.017"
        ),

        bibentry(
            bibtype = "Article",
            title   = paste(
                "Branch-and-bound algorithms for computing",
                "the best subset regression models"
            ),
            author  = c(
                person(
                    given = "Cristian",
                    family = "Gatu"
                ),
                person(
                    given = c("Erricos", "J."),
                    family = "Kontoghiorghes"
                )
            ),
            journal = "Journal of Computational and Graphical Statistics",
            year    = "2006",
            volume  = "15",
            pages   = "139-156",
            doi     = "10.1198/106186006x100290"
        ),

        bibentry(
            bibtype = "PhdThesis",
            title   = paste(
                "Algorithms for statistical model selection",
                "and robust estimation"
            ),
            author  = person(
                given = "Marc",
                family = "Hofmann"
            ),
            school  = "University of Neuchatel, Switzerland",
            year    = "2009",
            note    = "Supervisor: Erricos J. Kontoghiorghes"
        )
    )

    structure(biblio, mheader = mheader)
})
