title: Assigning label colour in ggplot based on condition returns unexpected (and incorrect) results
body: <p>Really strange thing going on, where if I try to assign the colour of the axis label based on a condition being met, the plot returned has axis labels coloured that do not match the criteria. </p>
  
  <p>For example</p>
  
  <pre><code> p &lt;- ggplot(mtcars, aes(x=as.factor(cyl), y=mpg)) + 
    geom_boxplot() 
  p +  theme(axis.text.x = element_text(color = ifelse(mtcars$cyl==4, "red", "black"), angle = 90, hjust = 1))
  </code></pre>
  
  <p>Returns a box plot where "8" is labelled red, and "4" and "6" are black. However if I set the condition that is not true in any of the cases eg:</p>
  
  <pre><code>p &lt;- ggplot(mtcars, aes(x=as.factor(cyl), y=mpg)) + 
    geom_boxplot() 
  p +  theme(axis.text.x = element_text(color = ifelse(mtcars$cyl=="something", "red", "black"), angle = 90, hjust = 1))
  </code></pre>
  
  <p>All labels are black. </p>
  
  <p>If I choose a condition that they all meet, they are all red, eg: </p>
  
  <pre><code>p &lt;- ggplot(mtcars, aes(x=as.factor(cyl), y=mpg)) + 
    geom_boxplot() 
  p +  theme(axis.text.x = element_text(color = ifelse(mtcars$cyl &lt; 100, "red", "black"), angle = 90, hjust = 1))
  </code></pre>
  
  <p>Yet anything where only some meet the criteria, I get random results. </p>
  
  <pre><code>p &lt;- ggplot(mtcars, aes(x=as.factor(cyl), y=mpg)) + 
    geom_boxplot() 
  p +  theme(axis.text.x = element_text(color = ifelse(mtcars$cyl &lt; 5, "red", "black"), angle = 90, hjust = 1))
  </code></pre>
  
  <p>returns only 8 as red, and </p>
  
  <pre><code>p &lt;- ggplot(mtcars, aes(x=as.factor(cyl), y=mpg)) + 
    geom_boxplot() 
  p +  theme(axis.text.x = element_text(color = ifelse(mtcars$cyl &lt; 7, "red", "black"), angle = 90, hjust = 1))
  </code></pre>
  
  <p>returns all of them as red. </p>
  
  <p>Does anyone know what's going on?! Any help would be much appreciated. </p>