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

I am trying to calculate the index of dispersion of a data set but anytime I input the code
IndexOfDispersion(horsekicks), It shows
Warning message: In mean.default(X, ...) : argument is not numeric or logical: returning NA
What can I do?

I suspect that horsekicks is not numeric. What do you get from running

str(horsekicks)

Also, where does the IndexOfDispersion function come from?

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.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.