# Calculating frequencies of multiple values in 200 colomns Classic List Threaded 8 messages Open this post in threaded view
|

## Calculating frequencies of multiple values in 200 colomns

 Hi All I have a dataset of 200 columns and 1000 rows , there are 3 repeated values under each column (7,8,10). I wanted to calculate the frequency of each value under each column and then apply the function maf () given that the frequency of each value is known. I can do the analysis step by step like this :- > Values          A       B       C       ... 200 1      7       10      7 2      7       8        7 3      10     8        7 4       8      7         10 . . . 1000 For column A : I calculate the frequency for the 3 values as follows :  count7 <- length(which(Values\$A == 7)) count8 <- length(which(Values\$A == 8)) count10 <- length(which(Values\$A == 10)) count7 = 2, count8 = 1 , count10= 1. Then, I create a vector  and type the frequencies manually :  Freq<- c( count7=2  ,count8= 1,count10=1) Then I apply the function maf ()  :- maf(Freq) This gives me the result I need for column A , could you please help me to perform the analysis for all of the 200 columns at once ? Regards Allahisone         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Calculating frequencies of multiple values in 200 colomns

Open this post in threaded view
|

## Re: Calculating frequencies of multiple values in 200 colomns

Open this post in threaded view
|

## Re: Calculating frequencies of multiple values in 200 colomns

Open this post in threaded view
|

## Re: Calculating frequencies of multiple values in 200 colomns

Open this post in threaded view
|