title: R convert query output to table
body: <p>New to R programming.
  I have a simple sql server query whose output looks like this :</p>
  
  <pre><code>EFFECTIVE_DATE  NumberOfUser
   2015-07-01         564
   2015-07-02         433
   2015-07-03         306
   2015-07-04         50
  </code></pre>
  
  <p>Here's how I issue the query:</p>
  
  <pre><code> barData &lt;- sqlQuery(sqlCon, 
                       "select EFFECTIVE_DATE,COUNT(USER_ID) as NumberOfUser from UserTable where start_dt between '20150701' AND '20150704' group by EFFECTIVE_DATE order by EFFECTIVE_DATE")
  </code></pre>
  
  <p>Now I am running this query from R and want to do a barplot on this. What is the best way to do that? </p>
  
  <p>Also how do i convert any query result to a data.table with which I can do barplot? When I try <code>table(myList)</code>, it is showing a different format altogether.</p>