title: Unexpected NULL while concatenating 2 strings using cat()
body: <pre><code>t1 &lt;- c('064359208644', '108595042227', '115705579765', '139254098290', '163646243244')
  t2 &lt;- c('064359208644', '139254098290', '163646243244')
  
  missing_elem &lt;- as.character(setdiff(t1, t2))
  missing_elem
  
  if(length(missing_elem) != 0){
    ss &lt;- cat("Missing ids:", missing_elem)
  }else{
    ss &lt;- "There are no missing ids"
  }
  
  ss
  </code></pre>
  
  <p>When I print the output of ss here it shows <code>NULL</code> but if t1 and t2 are the same and <code>length(missing_elem)</code> is 0 then ss is properly set to "There are no missing ids" and shows accordingly. Any idea why this might happen?</p>