title: R replace() conflict with logical test
body: <pre><code>library(tidyverse)
  df &lt;- tibble(fruit = c("apple", "pear"), value = c(3, 1))
  #&gt; # A tibble: 2 x 2
  #&gt;   fruit value
  #&gt;   &lt;chr&gt; &lt;dbl&gt;
  #&gt; 1 apple     3
  #&gt; 2 pear      1
  </code></pre>
  
  <p>When I try to replace occurrences of "apple" with "golden apple", everything in the same column turns into "golden apple". Yet my logical specifies that fruit must equal "apple" <code>(fruit == "apple")</code>. Is something else wrong? How did my pear turn into a golden apple?</p>
  
  <pre><code>df %&gt;% replace(fruit == "apple", "golden apple")
  #&gt; # A tibble: 2 x 2
  #&gt;   fruit        value
  #&gt;   &lt;chr&gt;        &lt;dbl&gt;
  #&gt; 1 golden apple     3
  #&gt; 2 golden apple     1
  </code></pre>
  
  <p>If I try within the mutate framework I get an error:</p>
  
  <pre><code>df %&gt;% mutate(fruit = replace(fruit == "apple", "golden apple"))
  #&gt; Error in replace(fruit == "apple", "golden apple") : 
  #&gt;   argument "values" is missing, with no default
  </code></pre>