title: How to split a vector into two vectors in R
body: <p>After a function I get my matrix back as one vector</p>
  
  <p>Example;</p>
  
  <pre><code>  [1] "M.                                "     "Mueller                                  "
    [3] "C.                                "     "Mueller                                  "
    [5] "L.                                "     "Mueller                                  "
    [7] "U.                                "     "Mueller                                  "
    [9] "D.                                "     "Mueller                                  ",
  </code></pre>
  
  <p>Now I want to split this into 2 Vectors, one Vector with all the "Mueller" and one vector with M.,C. etc.</p>
  
  <p>Thanks in advance!
  EDIT:
  I get kinda weird results with split</p>
  
  <pre><code>test1&lt;-split(test, c(1,2))
  vorname&lt;-test1[[1]]
  
  structure(c("M.                                ", "C.                               ", 
  "L.                             ", "U.                                ", 
  
      ..), .Names = c("1.vorname", "2.vorname", "3.vorname", "4.vorname", 
      "5.vorname", "6.vorname", "7.vorname", "8.vorname", "9.vorname", 
  </code></pre>
  
  <p>vorname is the name of the column 1</p>
  
  <p>EDIT 2:</p>
  
  <pre><code>structure(list(vorname = structure(c(48L, 48L, 38L, 65L, 73L, 
  67L, 17L, 75L, 39L, 61L), .Label = c("Adrian                               ", 
  "Andrea                               ", "Andreas                              ", 
  "Angela                               ", "Anna Lena                            ", 
  "AnnaElisabeth                        ", "AnnaSarah                            ", 
  "Beate                                ", "Bernd                                ", 
  "Birgit                               ", "BrunoHeribert                        ", 
  "Carina                               ", "Carolin                              ", 
  "Chris Joachim                        ", "Christa                              ", 
  "Christian                            ", "Christopher                          ", 
  "Cornelia                             ", "Daniel Markus                        ", 
  "DavidBenjamin                        ", "Dennis                               ", 
  "Elena                                ", "Elisabeth                            ", 
  "Erhard                               ", "Frieder                              ", 
  "Friederike                           ", "HansJörg                             ", 
  "Harald                               ", "Heike                                ", 
  "Heinz                                ", "Ilka                                 ", 
  "Jan                                  ", "Janina                               ", 
  "Janine                               ", "Jessica Louise                       ", 
  "JörgHenning                          ", "Jürgen                               ", 
  "Karin                                ", "Karl Heinz                           ", 
  "Katharina                            ", "Kathrin                              ", 
  "Katja                                ", "KlausDieter                          ", 
  "Ljubow                               ", "Luise                                ", 
  "Lutz                                 ", "Mandy                                ", 
  "Marco                                ", "Marius                               ", 
  "Mattea                               ", "Matthias                             ", 
  "Maurice                              ", "Maximilian                           ", 
  "Melanie                              ", "Melissa                              ", 
  "Michael                              ", "Miriam                               ", 
  "Norbert                              ", "Oliver                               ", 
  "Peer                                 ", "Peggy                                ", 
  "RalfMichael                          ", "Rebekka                              ", 
  "Regina                               ", "Rolf                                 ", 
  "Rosalinde                            ", "Sandra                               ", 
  "Silvia                               ", "Stefan                               ", 
  "Stefanie                             ", "Stephan                              ", 
  "Susan                                ", "Svitlana                             ", 
  "SwaantjeCathrin                      ", "Thomas                               ", 
  "Tino                                 ", "UdoHeinz                             ", 
  "Ulrike                               ", "Uwe                                  ", 
  "Viktoria                             "), class = "factor"), 
      nachname = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
      1L), .Label = "Müller                                  ", class = "factor")), .Names = c("vorname", 
  "nachname"), row.names = c(NA, 10L), class = "data.frame")
  </code></pre>