To calculate the mean of each column in a data frame in R, you would use the ______ function.

  • colMeans()
  • rowMeans()
  • mean()
  • apply()
To calculate the mean of each column in a data frame in R, you would use the colMeans() function. The colMeans() function computes the mean values across each column of the data frame.
Add your answer
Loading...

Leave a comment

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