title: R: cut string of characters in vectors
body: <p>let <code>x</code> be the vector </p>
  
  <pre><code>[1] "hi"            "hello"         "Nyarlathotep"
  </code></pre>
  
  <p>Is it possible to produce a vector, let us say <code>y</code>, from <code>x</code> s.t. its components are</p>
  
  <pre><code>[1] "hi"            "hello"         "Nyarl"
  </code></pre>
  
  <p>?</p>
  
  <p>In other words, I would need a command in R which cuts strings of text to a given length (in the above, length=5).</p>
  
  <p>Thanks a lot!</p>