title: Why do we omit NULL values instead of replacing by 0 in a vector?
body: <p>I have a dataset of characters including <code>NULL</code> values as <code>"NA"</code>. To calculate the mean value should I omit NA or replace NA with 0? </p>
  
  <p>Someone encouraged me to omit <code>NULL</code> values rather replace with 0.My question is why we shouldn't replace with 0? </p>
  
  <pre><code>OmitNA&lt;-na.omit(oswego$age) # The NA value is omitted and remaining data is stored in OmitNA
  AsNum&lt;-as.numeric(OmitNA) # OmitNA from previous step is stored as numberic in AsNum
  print(mean(AsNum)) # Mean is calculated
  </code></pre>
  
  <p>I need a reason why I shouldn't replace <code>NULL</code> with 0.</p>