title: Is there a function to paste NA_character_?
body: <p>As expected, the base R <code>paste()</code> function coerces <code>NA_character_</code> to <code>&quot;NA&quot;</code>.</p>
  <p>From the documentation of the base R paste() function:</p>
  <blockquote>
  <p>Note that <code>paste()</code> coerces <code>NA_character_</code>, the character missing value, to <code>&quot;NA&quot;</code> which may seem undesirable, e.g., when pasting two character vectors, or very desirable, e.g. in <code>paste(&quot;the value of p is &quot;, p)</code>.</p>
  </blockquote>
  <p>example:</p>
  <pre><code>paste(NA_character_)
  </code></pre>
  <p>returns <code>&quot;NA&quot;</code></p>
  <p>Is there a function (<code>magicFunction</code> in the example below) that preserves <code>NA_character_</code>?
  i.e. that</p>
  <pre><code>magicFunction(NA_character_)
  </code></pre>
  <p>would return <code>NA</code> and not <code>&quot;NA&quot;</code>?</p>
  <p>I woudld like to use the function in the following context:</p>
  <pre><code>library(tidyverse)
  toColumn = list(df1 = tibble(letts = c(&quot;a&quot;,&quot;b&quot;,NA_character_,&quot;c&quot;)),
                  df2 = tibble(letts = c(&quot;alpha&quot;,&quot;beta&quot;,NA_character_,&quot;gamma&quot;)),
                  df3 = tibble(letts = c(NA_character_)))
                  
  final_df  = toColumn %&gt;% purrr::map(~.x %&gt;% dplyr::pull(letts) %&gt;%
    paste(.,collapse=&quot;;&quot;) %&gt;% dplyr::tibble(pasted_letts = .) ) %&gt;% 
    dplyr::bind_rows(.)
  </code></pre>
  <p>where the third row of the final data frame column &quot;pasted_letts&quot; contains <code>&quot;NA&quot;</code> and I would like to preserve the <code>NA_character_</code>  of the original data frame <code>df3</code> in order to use e.g. is.na() for filtering, mutate etc..</p>