LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2011, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 31 Oct 2011 08:50:55 -0400
Reply-To:     Tom Abernathy <tom.abernathy@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Tom Abernathy <tom.abernathy@GMAIL.COM>
Subject:      Re: commen frequency
Content-Type: text/plain; charset=ISO-8859-1

What do you mean? Do you want to take the frequency of value rsXXXXX in column A and add the number of times that same gene appeared in column B?

proc freq data=have; tables a / noprint out=a(rename=(a=gene count=a)); tables b / noprint out=b(rename=(b=gene count=b)); tables c / noprint out=c(rename=(c=gene count=c)); tables d / noprint out=d(rename=(d=gene count=d)); run; data want ; merge a b c d ; by gene; ab=sum(a,b); ac=sum(a,c); .... run;

Or do you want to count the number of rows where A=B? data temp; set have; ab=a=b; ac=a=c; ...; run; proc means data=temp; var ab ac ... ; output out=want sum=; run;

On Sun, 30 Oct 2011 21:00:08 -0700, oslo <hokut1@YAHOO.COM> wrote:

>Dear SAS-L Users; � I have a data set with 4 columns given as follows. I need get the commen frequency of variable in the columns. That is I need get a) Frequency of the same variables in A-B columns b) Frequency of the same variables in A-C columns c) Frequency of the same variables in A-D columns d) Frequency of the same variables in B-C columns . . Then frequency of the same variables in A-B-C columns �Frequency of the same variables in A-B-D . . At the end the frequency of the same variables in A-B-C-D � Best regards, Oslo � �

A B C D rs29024430 �rs43708440 rs29024430 �r29024430 rs29009912 �rs29009907 rs43708440 �rs43708440 rs29009979 �rs29009912 rs29009907 �rs29010802 rs29010147 �rs29012086 rs29009912 �rs17871338 rs29010295 �rs29012174 rs29009979 �rs29009907 rs29010510 �rs29013844 rs29010295 �rs29009912 rs29011155 �rs29016146 rs29010461 �rs29009979 rs29012070 �rs29017980 rs29011155 �rs29010295 rs29012174 �rs29018185 rs29012070 �rs29010461


Back to: Top of message | Previous page | Main SAS-L page