R/print.scopus_api_key.R

Defines functions print.scopus_api_key

Documented in print.scopus_api_key

#' Print method for Scopus API key
#'
#' @return NULL
#' @param x an object used to select a method.
#' @param ... further arguments passed to or from other methods
#' @param reveal Should the API key be revealed
#' @export
#'
#' @examples
#' x = "asdf"
#' class(x) = "scopus_api_key"
#' print(x)
#' print(x, reveal = TRUE)
#' @method print scopus_api_key
print.scopus_api_key = function(x, reveal = FALSE, ...) {
  if (reveal) {
    print(as.character(x), ...)
  } else {
    cat("<hidden api key, use print(, reveal = TRUE) to see it>")
  }
}

Try the rscopus package in your browser

Any scripts or data that you put into this service are public.

rscopus documentation built on Sept. 18, 2019, 1:03 a.m.