tabulate(),notepad++

x<-sample(1:10,10,replace=TRUE)
tabulate(x,nbins=10)