title: how to use right/left to split a variable in sqldf, as in left(x,n)
body: <p>Is there a different function in R to use to get the same result as in SQL for left or right function?</p>
  <p>For instance, the following query in SQL would give the first 6 characters of a column:</p>
  <pre><code>select left(x, 6)
  from table
  </code></pre>
  <p>However, when I try this in sqldf like this:</p>
  <pre><code>sqldf(&quot;select left(x,6) from table&quot;)
  </code></pre>
  <p>I get the following error:</p>
  <blockquote>
  <p>Error in sqliteSendQuery(con, statement, bind.data) :</p>
  <p>error in statement: near &quot;(&quot;: syntax error</p>
  </blockquote>
  <p>It gives me the x variable but not left(x,6). To clarify, the length of x is more than 6.</p>