title: Getting warning using setAs() to specify colClasses in R
body: <p>I tried using the answer @Greg Snow provided in this <a href="https://stackoverflow.com/questions/13022299/specify-date-format-for-colclasses-argument-in-read-table-read-csv">question</a>, but I keep getting a warning regardless of what I do. Can someone help with this:?</p>
  
  <pre><code>&gt; setAs("character","myDate",function(from) as.Date(from, format="%b %d, %Y %r"))
  in method for ‘coerce’ with signature ‘"character","myDate"’: no definition for class “myDate”
  </code></pre>
  
  <p>I wanted to make sure that the "methods" package is load (it looks like setAs depends on it) and I got this:</p>
  
  <pre><code>&gt; getOption("defaultPackages")
  [1] "datasets"  "utils"     "grDevices" "graphics"  "stats"     "methods"
  </code></pre>
  
  <p>TIA</p>