Skip to content
Prev 33678 / 398513 Next

mode of a data set

Erin Hodgess wrote:
Erin,
   Will this work for you?

R> x <- rbinom(100, size = 20, prob = .2)
R> table.x <- table(x)
R> table.x[which.max(table.x)]
  4
23
R>

Regards,
Sundar