R/nameAlreadyExists.R

Defines functions nameAlreadyExists

Documented in nameAlreadyExists

#' Does name already exist in memory?
#'
#' Evaluates if a name has already been saved by the r2shortcode. Keep in mind that if you previously used the clear function, previously saved names will be cleared
#'
#' @param name The name to lookup
#'
#' @return TRUE or FALSE
#'
#' @examples
#' nameToCheck <- 'Obinna'
#' nameAlreadyExists(nameToCheck)
#'
#' @export
#'


nameAlreadyExists <- function(name) {
  if (is.null(options()$.funCNames)) options(".funCNames" = c())
  fetchFuncNames <- options()$.funCNames
  return(name %in% fetchFuncNames)
}

Try the r2shortcode package in your browser

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

r2shortcode documentation built on July 2, 2020, 4:15 a.m.