Hi,
library(plyr) #sorry, forgot about that ?count() Anyway, Bill's solution is much easier and simple. You can also use this: set.seed(25) bindat<-rbinom(20,15,0.1) data.frame(value=0:5,freq=sapply(0:5,function(x,y=bindat) length(y[y==x]))) # value freq #1 0 4 #2 1 7 #3 2 6 #4 3 1 #5 4 2 #6 5 0 A.K. ----- Original Message ----- From: arun4 <arun.ganesh2...@gmail.com> To: r-help@r-project.org Cc: Sent: Wednesday, November 21, 2012 10:58 AM Subject: Re: [R] Creating a frequency table for binomial varaible Thank you A.K Btw in which package count() is available? -- View this message in context: http://r.789695.n4.nabble.com/Creating-a-frequency-table-for-binomial-varaible-tp4650286p4650305.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.