

   strsplit {base}                              R Documentation

   SSpplliitt tthhee SSttrriinnggss iinn aa VVeeccttoorr

   DDeessccrriippttiioonn::

        Split the strings in `x' into substrings according to
        the presence of substring `split' within them.

   UUssaaggee::

        strsplit(x,split)

   AArrgguummeennttss::

          x: character vector, to be split.

      split: character string, to use as "split".  If `split'
             has length 0, `x' is split into single characters.
             If `split' is a vector, it is re-cycled along `x'.

   VVaalluuee::

        A list of length `length(x)' the `i'-th element of
        which contains the vector of splits of `x[i]'.

   SSeeee AAllssoo::

        `paste' for the reverse, `grep' and `sub' for string
        search and manipulation; further `nchar', `substr'.

   EExxaammpplleess::

        noquote(strsplit("A text I want to display with spaces", NULL)[[1]])

        x <- c("asfef","qwerty","yuiop[","b","stuff.blah.yech")
        # split x on the letter e
        strsplit(x,"e")

