citHeader("To cite package 'missForest' or its original article in publications use:")

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

## Package citation
bibentry(
  bibtype = "Manual",
  title   = "missForest: Nonparametric Missing Value Imputation using Random Forest",
  author  = person(given = c("Daniel", "J."), family = "Stekhoven"),
  year    = year,
  note    = vers,
  textVersion = paste0(
    "Daniel J. Stekhoven (", year, "). ",
    "missForest: Nonparametric Missing Value Imputation using Random Forest. ",
    vers, "."
  )
)

## Original article citation
bibentry(
  bibtype = "Article",
  title   = "MissForest: nonparametric missing value imputation for mixed-type data",
  author  = c(
    person(given = c("Daniel", "J."), family = "Stekhoven"),
    person(given = "Peter", family = "Bühlmann")
  ),
  journal = "Bioinformatics",
  year    = 2012,
  volume  = 28,
  number  = 1,
  pages   = "112--118",
  doi     = "10.1093/bioinformatics/btr597",
  textVersion = paste(
    "Stekhoven, D. J., & Bühlmann, P. (2012).",
    "MissForest: nonparametric missing value imputation for mixed-type data.",
    "Bioinformatics, 28(1), 112–118.",
    "https://doi.org/10.1093/bioinformatics/btr597"
  )
)
