title: Reading CSV file in R and formatting dates and time while reading and avoiding missing values marked as?
body: <p>I am trying to Reading CSV file in R . How can I read and format dates and times while reading and avoid missing values marked as ?. The data I load after reading should be clean.</p>
  <p>I tried something like
  <code>data &lt;- read.csv(&quot;Data.txt&quot;)</code>
  It worked, but the dates and times were as is.</p>
  <p>Also how can I extract a subset of data from specific data range?</p>
  <p>For this I tried something like</p>
  <pre><code>subdata &lt;- subset(data, 
                    Date== 01/02/2007 &amp; Date==02/02/2007, 
                    select = Date:Sub_metering_3)
  </code></pre>
  <p>I get error <code>Error in eval(expr, envir, enclos) : object 'Date' not found</code></p>
  <p>Date is the first column.</p>