title: Problem of ambiguous character format using scale_x_date in ggplot2
body: <pre><code>str(tidy_factors)
  Classes ‘tbl_df’, ‘tbl’ and 'data.frame':   70650 obs. of  4 variables:
       $ date    : Date, format: "1992-06-01" "1992-06-02" ...
       $ Factor  : Factor w/ 5 levels "CMA","HML","MKT",..: 3 3 3 3 3 3 3 3 3 3 ...
       $ Variable: Factor w/ 2 levels "Centrality","Return": 2 2 2 2 2 2 2 2 2 2 ...
       $ Value   : num  -0.0012 -0.0022 -0.0012 -0.0029 0.0003 -0.0043 -0.0037 -0.0038 0.0026 -0.0024 ...
  </code></pre>
  
  <p>I would like to understand the pattern in the <code>Value</code> that the <code>Factor</code> takes over time (<code>date</code>). </p>
  
  <pre><code>library(tidyverse)    
  tidy_factors %&gt;% filter(Variable=="Centrality")%&gt;%
  group_by(date) %&gt;%  
  ggplot(aes(x=date,y=Factor, fill=Value))+
  geom_bar(stat="identity")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/OJYkd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OJYkd.png" alt="enter image description here"></a></p>
  
  <p>I get to visualize it in a nice manner but the dates on the x axis are indistinguishable. When I try to <code>scale_x_date</code> to get a better understanding of the values that it takes according to different periods I get the following error:</p>
  
  <pre><code>tidy_factors %&gt;% filter(Variable=="Centrality")%&gt;%
    group_by(date) %&gt;%  
    ggplot(aes(x=date,y=Factor, fill=Value))+
    geom_bar(stat="identity")+
    scale_x_date(date_breaks = "1 year", date_labels="%Y")
  
  Error in charToDate(x) :
      character string is not in a standard unambiguous format
  </code></pre>
  
  <p>I also tried "1 years","1 month" ecc...
  The dates are already unique for each <code>Factor</code> level. Can you tell me what is the problem?</p>