R/abbreviation.R

Defines functions abbr_journal_name

Documented in abbr_journal_name

#' Journal name abbreviation
#' @param x journal name
#' @examples
#' abbr_journal_name("Proceedings of the National Academy of Sciences")
#' @export
abbr_journal_name <- function(x) {
  gsub("Proceedings of the National Academy of Sciences", "PNAS",
    gsub("Journal", "J.",
            gsub("\\{", "",
                 gsub("}", "",
                      gsub("\\{\\\\", "", x)))))
}
uribo/buckyR documentation built on Dec. 23, 2021, 2:02 p.m.