R/Mode.R

Defines functions Mode

Mode <-
function(x) {
  # function for calculating the mode
  ux = unique(x)
  ux[which.max(tabulate(match(x, ux)))]
}

Try the P2C2M package in your browser

Any scripts or data that you put into this service are public.

P2C2M documentation built on May 2, 2019, 8:24 a.m.