How to find the statistical mode?

前端 未结 30 1646
时光取名叫无心
时光取名叫无心 2020-11-21 07:00

In R, mean() and median() are standard functions which do what you\'d expect. mode() tells you the internal storage mode of the objec

30条回答
  •  北荒
    北荒 (楼主)
    2020-11-21 07:47

    This works pretty fine

    > a<-c(1,1,2,2,3,3,4,4,5)
    > names(table(a))[table(a)==max(table(a))]
    

提交回复
热议问题