R/trim.r

###############################################################################################################################
# Name             :  trim 
# Date             :  2016-06-03 
# Author           :  Christopher Mooney 
# Dept             :  Business Analytics 
# Purpose          :  function designed to remove white space 
###############################################################################################################################
# ver    user        date(YYYYMMDD)        change  
# 1.0   w47593        20160603               initial
############################################################################################################################### 

trim <-  function(x){ require(stringr)
                      x <- gsub('  ',' ',x) 
                      x <- gsub('  ',' ',x) 
                      x <- gsub('  ',' ',x) 
                      x <- gsub('  ',' ',x) 
                      x <- str_trim(x, side = c("both"))
                      return(x)}
moone009/wec-preprocess documentation built on May 23, 2019, 6:10 a.m.