Suppose you're given a numeric vector in R and asked to calculate its mean. How would you do it?

  • Use the mean() function with the vector as an argument
  • Use the median() function with the vector as an argument
  • Use the sum() function with the vector as an argument
  • Use the mode() function with the vector as an argument
To calculate the mean of a numeric vector in R, you would use the mean() function with the vector as an argument. The mean() function returns the arithmetic average of the values in the vector.
Add your answer
Loading...

Leave a comment

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