How about: table(samp)
-- Robert Tirrell | r...@stanford.edu | (607) 437-6532 Program in Biomedical Informatics | Butte Lab | Stanford University On Thu, Feb 10, 2011 at 13:54, Nipesh Bajaj <bajaj141...@gmail.com> wrote: > > set.seed(100) > > samp <- sample(c(1,-1,0), 20, replace=T); samp > [[alternative HTML version deleted]] ______________________________________________ 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.