mode
This is an old revision of the document!
최빈값 (mode)는 자료 (데이터)에서 가장 빈번하게 나타나는 관측치를 말한다. NOIR 모두에서 사용할 수 있다. 최빈 값을 두개 갖는 데이터를 bi-modal이라고 한다.
unimodal
bimodal
trimodal
multimodal
R에서는 mode 값을 구하는 function이 없다. mode라는 function은 있지만 기능은 집합 혹은 변인이 numeric인지 character인지를 알려주는 storage mode function이다.
- rs01
- rout01
Loading...
> # install.packages("DescTools")
> # library(DescTools)
>
> a <- c(104, 19, 20, 19, 20, 100, 20, 21, 21, 24)
> s.a <- sort(a)
> s.a
[1] 19 19 20 20 20 21 21 24 100 104
> Mode(a)
[1] 20
attr(,"freq")
[1] 3
>
> a2 <- c(104, 19, 20, 19, 20, 100, 20, 21, 21, 24, 21)
> s.a2 <- sort(a2)
> Mode(a2)
[1] 20 21
attr(,"freq")
[1] 3
>
>
> # Example usage with a character vector
> chv <- c("w", "x", "y", "x", "x", "y", "love")
> Mode(chv)
[1] "x"
attr(,"freq")
[1] 3
>
mode.1773183167.txt.gz · Last modified: by hkimscil
