There are several ways to subset the dataframe ?select will give you one. or mydata[mydata$A=value]<- mydata
then apply sum() I do not think there is one single command equivalent to sumif() --- On Sun, 9/28/08, caocheng曹成 <[EMAIL PROTECTED]> wrote: > From: caocheng曹成 <[EMAIL PROTECTED]> > Subject: [R] does there any function like sumif in excel? > To: R-help@r-project.org > Received: Sunday, September 28, 2008, 10:25 PM > I have a data.frame datas which have two columns A and B. > I want to filter column A by some values and to get a value > list which > contain the value in B. > Best wishes! > > [[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. __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.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.