title: How to replace 0 or missing value with NA in R
body: <p>this is what  i have already done so far
  data is numeric data type</p>
  
  <pre><code>if (is.na(data) || attribute==0){replace(data,NA)}
  </code></pre>
  
  <p>it gives me error message that </p>
  
  <blockquote>
    <p>Error in replace(attribute, NA) : argument "values" is missing, with no default</p>
  </blockquote>