Thanks, got it. ****************************************************************** Bander Alzahrani, r
************************************* Date: Thu, 21 Nov 2013 09:14:11 -0600 Subject: Re: [R] frequency of numbers From: deter...@umn.edu To: cs_2...@hotmail.com CC: r-help@r-project.org If you just need a count of how many of each number you can just use table(). > tmp <- c(111,106,117,108,120,108,108,116,113) > table(tmp) tmp 106 108 111 113 116 117 120 1 3 1 1 1 1 1 On Thu, Nov 21, 2013 at 9:10 AM, b. alzahrani <cs_2...@hotmail.com> wrote: hi guys Assume I have this dataframe: v3$number_of_ones [1] 111 106 117 108 120 108 108 116 116 113 Is there any command in r that gives me the frequency of these numbers (how many each number is repeated e.g. the number 108 repeated 2 and 111 repeated one an so on) I have around 10^6 number and would like to see how many each number if repeated. Regards ****************************************************************** Bander Alzahrani, [[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. -- Charles Determan Integrated Biosciences PhD Candidate University of Minnesota [[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.