title: Reading time from CSV file in R
body: <p>I want to read a CSV file separated by ";" which contains four columns, such as:</p>
  
  <pre><code>16/12/2006;17:24:00;0;1
  16/12/2006;17:25:00;2;3
  16/12/2006;17:26:00;4;5
  </code></pre>
  
  <p>but I want a dataframe with 3 columns rather than 4 (that is, merge the date and hour of the two first columns into a single one).</p>
  
  <p>So far, I have come up with this portion of code inspired by <a href="https://stackoverflow.com/questions/13022299/specify-date-format-for-colclasses-argument-in-read-table-read-csv">Specify custom Date format for colClasses argument in read.table/read.csv</a> to read the data. Then, I'd merge the two columns somehow.</p>
  
  <pre><code>setClass("myDate")
  setAs("character","myDate", function(from) as.Date(from, format="%d/%m/%Y") )
  setClass("myTime")
  setAs("character","myTime", function(from) as.Date(from, format="%H:%M:%S") )
  
  data &lt;- read.table(file = "file.csv", header = FALSE, sep = ";", colClasses =  c("myDate", "myTime", "numeric", "numeric"))
  </code></pre>
  
  <p>However, the resulting data frame does have a column V2 in which the hour is not properly read.</p>
  
  <pre><code>          V1         V2 V3 V4
  1 2006-12-16 2016-03-04  0  1
  2 2006-12-16 2016-03-04  2  3
  3 2006-12-16 2016-03-04  4  5
  </code></pre>
  
  <p>Is the myTime class badly defined? If so, how should I change it?</p>