9
Suppose you have the following data:
a<-c(rep("agosto",3),rep("janeiro",4),rep("maio",6))
table(a)
I want to know the month with the minimum of observations?
With the function min(table(a))
the answer is the minimum value and not the month with fewer observations.
If you use the function which.min()
the following result shall be obtained.
> which.min(table(a))
agosto
1
But what I need is for you to return only to the category.