title: How to use the strsplit function with a period
body: <p>I would like to split the following string by its periods. I tried <code>strsplit()</code> with <code>"."</code> in the <code>split</code> argument, but did not get the result I want.</p>
  
  <pre><code>s &lt;- "I.want.to.split"
  strsplit(s, ".")
  [[1]]
   [1] "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
  </code></pre>
  
  <p>The output I want is to split <code>s</code> into 4 elements in a list, as follows.</p>
  
  <pre><code>[[1]]
  [1] "I"     "want"  "to"    "split"
  </code></pre>
  
  <p>What should I do?</p>