

The two remove NA values in r is by the na.omit() function that deletes the entire row, and the na.rm logical perimeter which tells the function to skip that value. While this may be okay sometimes in other cases you need a number.

If you include the NA value in a calculation it will result in an NA value. So, somehow it needs to be removed from the calculations to get a meaningful value. Because the NA value is a placeholder and not an actual numeric value, it cannot be included in calculations.
