Presumably you want all the columns _except_ column 1, right?

Perhaps (no code, no test) :

sum( dta[ dta[,1]=="boy , -1 ] )

-- David.
On Nov 22, 2009, at 3:44 PM, ychu066 wrote:


for example, i want to sum all the row entries if column 1 takes the value
"boy". anyone knows ?
--
View this message in context: 
http://old.nabble.com/any-equivalent-SUM-IF-statement-in-R-tp26467889p26467889.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
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.

Reply via email to