Message-ID: <972822.20441.qm@web38408.mail.mud.yahoo.com>
Date: 2008-09-29T14:20:38Z
From: John Kane
Subject: does there any function like sumif in excel?
In-Reply-To: <b090ff300809281925x7b479d70yb10093d0f9c8f0b7@mail.gmail.com>
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?? <caocheng8230 at gmail.com> wrote:
> From: caocheng?? <caocheng8230 at gmail.com>
> Subject: [R] does there any function like sumif in excel?
> To: R-help at 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 at 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.