title: How to remove NA in character data in R
body: <p>I would like to copy the last two columns from each month to the beginning of the next month. I did it as follows (below), but the data contains NA and when I change it to character, the program breaks down. How do I copy columns to keep their type?</p>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>library(readxl)
  library(tibble)
  
  df&lt;- read_excel("C:/Users/Rezerwa/Documents/Database.xlsx")
  
  df=add_column(df, Feb1 = as.character(do.call(paste0, df["January...4"])), .after = "January...5")
  df=add_column(df, Feb2 = as.numeric(do.call(paste0, df["January...5"])), .after = "Feb1")
  
  </code></pre>
  
  <p><strong>My data:</strong></p>
  
  <pre><code>df
  # A tibble: 10 x 13
     Product January...2 January...3 January...4 January...5 February...6 February...7 February...8 February...9 March...10 March...11 March...12 March...13
     &lt;chr&gt;   &lt;lgl&gt;       &lt;lgl&gt;       &lt;chr&gt;             &lt;dbl&gt; &lt;chr&gt;               &lt;dbl&gt; &lt;chr&gt;               &lt;dbl&gt; &lt;chr&gt;           &lt;dbl&gt; &lt;chr&gt;           &lt;dbl&gt;
   1 a       NA          NA          754.00                4 754.00                  4 754.00                  4 754.00              4 754.00              4
   2 b       NA          NA          706.00                3 706.00                  3 706.00                  3 706.00              3 706.00              3
   3 c       NA          NA          517.00                3 517.00                  3 517.00                  3 517.00              3 517.00              3
   4 d       NA          NA          1466.00               9 1466.00                 9 1466.00                 9 1466.00             9 1466.00             9
   5 e       NA          NA          543.00                8 543.00                  8 543.00                  8 543.00              8 543.00              8
   6 f       NA          NA          NA                   NA NA                     NA NA                     NA NA                 NA NA                 NA
   7 g       NA          NA          NA                   NA NA                     NA NA                     NA NA                 NA NA                 NA
   8 h       NA          NA          NA                   NA NA                     NA NA                     NA NA                 NA NA                 NA
   9 i       NA          NA          1466.00               8 NA                     NA NA                     NA NA                 NA NA                 NA
  10 j       NA          NA          NA                   NA 543.00                  3 NA                     NA NA                 NA NA                 NA
  </code></pre>
  
  <p><strong>My error:</strong></p>
  
  <pre><code>&gt; df=add_column(df, Feb1 = as.character(do.call(paste0, df["January...4"])), .after = "January...5")
  &gt; df=add_column(df, Feb2 = as.numeric(do.call(paste0, df["January...5"])), .after = "Feb1")
  Warning message:
  In eval_tidy(xs[[i]], unique_output) : NAs introduced by coercion
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/6hnZQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6hnZQ.png" alt="enter image description here"></a></p>