#Example 1
data<-c(rep(6,9),rep(3,3))
#mode(data,type=1,"NULL","NULL")
#Example 2
#data<-c(rep(6,9),rep(3,9))
#mode(data,type=1,"NULL","NULL")
#Example 3
#data<-c(rep(6,9),rep(3,8),rep(7,7),rep(2,6))
#mode(data,type=1,"NULL",2)
#Example 4
#data<-c(rnorm(15,0,1),rnorm(21,5,1),rep(3,3))
#mode(data)
#Example 5
#data<-c(rep(6,3),rep(3,3),rnorm(15,0,1))
#mode(data,3,NULL,4)
#mode(data,type=2,digits=1,3)Run the code above in your browser using DataLab