In mean.default(X, ...) : argument is not numeric or logical: returning NA

Homework inspired questions are welcome here, but you have to be more specific about what have you tried so far? what is your specific problem?

For guidelines about how to properly ask homework related questions here, please read our homework policy.