title: remove NA values and combine non NA values into a single column
body: <p>I have a data set which has numeric and NA values in all columns. I would like to create a new column with all non NA values and preserve the row names </p>
  
  <pre><code>    v1  v2  v3  v4  v5
  a   1   NA  NA  NA  NA 
  b   NA  2   NA  NA  NA
  c   NA  NA  3   NA  NA
  d   NA  NA  NA  4   NA
  e   NA  NA  NA  NA  5
  </code></pre>
  
  <p>I have tried using the coalesce function from dplyr</p>
  
  <pre><code>digital_metrics_FB &lt;- fb_all_data %&gt;%
                        mutate(fb_metrics = coalesce("v1", 
                                                     "v2", 
                                                     "v3", 
                                                     "v4",
                                                     "v5")) 
  </code></pre>
  
  <p>and also tried an apply function </p>
  
  <pre><code>df2 &lt;- sapply(fb_all_data,function(x) x[!is.na(x)])
  </code></pre>
  
  <p>still cannot get it to work. </p>
  
  <p>I am looking for the final result to be where all non NA values come together in the final column and the row names are preserved </p>
  
  <pre><code>    final  
   a    1
   b    2
   c    3
   d    4
   e    5
  </code></pre>
  
  <p>any help would be much appreciated</p>