R/attributecleanName.R

Defines functions attributeCleanName

Documented in attributeCleanName

#' attributeCleanName - converts names to uppercase and replaces spaces with underscores to 
#' reference attribute names. 
#' \code{attributeCleanName} clean attribute name.
#' @param name  string to clean 
#' @export
#' @return Returns attribute name as the API will use.
#' @examples
#'\dontrun{
#' new_name <-CoreAPIV2::attributeCleanName("My Comments")
#' new_name
#' MY_COMMENTS
#'  }
#'@author Craig Parman, ngsAnalytics, ngsanalytics.com
#'@description \code{attriureCleanName} - onverts names to uppercase and replaces spaces with underscores to 
#' reference attribute names.
 
attributeCleanName <- function(name)
{
  name <- toupper(name)
  
  name <- gsub("[ ,&,%]", "_", name)
  
  
  name
  
  
}
ceparman/Core5.3 documentation built on May 7, 2019, 8:16 a.m.