1 개요[ | ]
- R getmode()
R
Copy
getmode <- function(v) {
uniqv <- unique(v)
uniqv[which.max(tabulate(match(v, uniqv)))]
}
v <- c(2,1,2,3,1,2)
getmode( v )
Loading
R
Copy
getmode <- function(v) {
uniqv <- unique(v)
uniqv[which.max(tabulate(match(v, uniqv)))]
}
charv <- c("o","it","the","it","it")
getmode( charv )
Loading
2 같이 보기[ | ]
- R mode() - 최빈값과 관계없는 다른 함수
- R mean()
- R median()
- 최빈값
- 함수 mode()
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.