R/string.blank.omit.R

Defines functions string.blank.omit

Documented in string.blank.omit

string.blank.omit <-
function (string)  
#  Suppresses blanks in a string: returns string without blanks
{     k <- 1
      str <- ""
      for (j in 1:nchar(string))
      { if(substr(string,j,j)!=" ") 
          { str <- ifelse (str=="",substr(string,j,j),paste(str,substr(string,j,j),sep=""))
            k <- k + 1
          }
      }
  return (str)
}

Try the Biograph package in your browser

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

Biograph documentation built on May 29, 2017, 11:48 a.m.