title: str_replace pattern is "" gives "Error in mutate_impl(.data, dots) : Evaluation error: Not implemented."
body: <p>I have a feature in a df with some missing values which are showing as just "".</p>
  
  <pre><code>unique(page_my_df$Type)
  [1] "list"              "narrative" "how to"            "news feature"     
  [5] "diary"     ""                  "interview" 
  </code></pre>
  
  <p>I want to replace all instances of "" with "unknown".</p>
  
  <pre><code>page_my_df &lt;- page_my_df %&gt;% 
    mutate(Type = str_replace(.$Type, "", "unknown"),
           Voice = str_replace(.$Voice, "", "unknown"))
  </code></pre>
  
  <blockquote>
    <p>Error in mutate_impl(.data, dots) : Evaluation error: Not implemented.</p>
  </blockquote>
  
  <p>Read some documentation <a href="https://rdrr.io/cran/stringr/man/str_replace.html" rel="nofollow noreferrer">here</a>, specifically under pattern:</p>
  
  <blockquote>
    <p>Match character, word, line and sentence boundaries with boundary(). An empty pattern, "", is equivalent to boundary("character").</p>
  </blockquote>
  
  <p>So I tried:</p>
  
  <pre><code>page_my_df &lt;- page_my_df %&gt;% 
    mutate(Type = str_replace(.$Type, boundary(""), "unknown"),
           Voice = str_replace(.$Voice, boundary(""), "unknown"))
  </code></pre>
  
  <p>Which then gave:</p>
  
  <blockquote>
    <p>Error in mutate_impl(.data, dots) : 
      Evaluation error: 'arg' should be one of “character”, “line_break”, “sentence”, “word”.</p>
  </blockquote>
  
  <p>How can I replace empty character strings with "unknown" within dplyr::mutate()?</p>