The ______ function in R can be used to handle missing values when calculating the mean.

  • mean()
  • na.rm()
  • na.omit()
  • na.mean()
The na.rm = TRUE parameter is used with the mean() function in R to handle missing values when calculating the mean. Setting na.rm = TRUE instructs R to ignore missing values in the calculation.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *