Advertisement
jjdeharo

moda

Jun 22nd, 2015
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.13 KB | None | 0 0
  1. # Calcula la moda de un conjunto de datos
  2.  
  3. moda <- function(x) {
  4.   t <- table(x)
  5.   return(as.numeric(names(t)[t == max(t)]))
  6.  
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement