From: Sean O'Riordain <sean.oriordain_at_gmail.com>

Date: Fri 19 Aug 2005 - 16:24:56 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Aug 19 16:34:06 2005

Date: Fri 19 Aug 2005 - 16:24:56 EST

I'm only a beginner at R so no doubt one of our expert colleagues will help me...

and if I want to calculate the sum() of column E, then I just say something like...

*> sum(fred[fred[,3]=="G",][,5])
*

[1] 6

*>
*

On 18/08/05, A. Mani <a_mani_sc_gs@vsnl.net> wrote:

> Hello,

*> I want to avoid loops in the following situation. There is a 5-col
**> dataframe with col headers alone. two of the columns are non-numeric. The
**> problem is to calculate statistics(scores) for each element of one column.
**> The functions depend on matching in the other non-numeric column.
**>
**> A B C E F
**> 1 2 X Y 1
**> 2 3 G L 1
**> 3 1 G L 5
**> and so on ...30000+ entries.
**>
**> I need scores for col E entries which depend on conditional implications.
**>
**>
**> Thanks,
**>
**> A. Mani
**> Member, Cal. Math. Soc
**>
**> ______________________________________________
**> R-help@stat.math.ethz.ch mailing list
**> https://stat.ethz.ch/mailman/listinfo/r-help
**> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
**>
*

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Aug 19 16:34:06 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:39:54 EST
*