Subject: Re: [R] Summarize by two or more attributes
On May 17, 2011, at 2:55 PM, ROLL Josh F wrote:
> Marc,
> How could I also apply the spline function to each of the 'columns' found in
> the result from
>
> tapply(Df$Rate,list(Df$Bin,Df$Type),sum)
>
> ??
S
On May 17, 2011, at 2:55 PM, ROLL Josh F wrote:
> Marc,
> How could I also apply the spline function to each of the 'columns' found in
> the result from
>
> tapply(Df$Rate,list(Df$Bin,Df$Type),sum)
>
> ??
Something along the lines of the following:
apply(tapply(Df$Rate,list(Df$Bin,Df$
Cc: r-help@r-project.org
Subject: Re: [R] Summarize by two or more attributes
On May 17, 2011, at 12:53 PM, LCOG1 wrote:
> I will hit my own ball on this one
>
>
> tapply(Df$Rate,list(Df$Bin,Df$Type),sum)
>
Ahayou had mentioned creating a new column in your initial post,
On May 17, 2011, at 12:53 PM, LCOG1 wrote:
> I will hit my own ball on this one
>
>
> tapply(Df$Rate,list(Df$Bin,Df$Type),sum)
>
Ahayou had mentioned creating a new column in your initial post, presumably
added to 'Df', as opposed to creating a new independent matrix of the results.
You
I will hit my own ball on this one
tapply(Df$Rate,list(Df$Bin,Df$Type),sum)
--
View this message in context:
http://r.789695.n4.nabble.com/Summarize-by-two-or-more-attributes-tp3529825p3530034.html
Sent from the R help mailing list archive at Nabble.com.
___
On May 17, 2011, at 11:48 AM, LCOG1 wrote:
> Okay everyone heres a likely softball for someone.
>
> Consider the following data frame:
>
> #Create data
> x<-rep(c(1,15),10)
> y<-rnorm(20)
> z<-c(rep("auto",10),rep("bus",10))
> a<-rep(c(1,1,2,2,3,3,4,4,5,5),2)
> #Create Data frame
> Df<-data.fram
dlife Service
California, USA
http://www.fws.gov/redbluff/rbdd_jsmp.aspx
- Original Message
> From: LCOG1
> To: r-help@r-project.org
> Sent: Tue, May 17, 2011 9:48:36 AM
> Subject: [R] Summarize by two or more attributes
>
> Okay everyone heres a likely softball for someon
One possibility is:
library(doBy)
summaryBy(Rate~Source+Bin, data=Df, FUN=sum)
On 5/17/2011 12:48 PM, LCOG1 wrote:
> Okay everyone heres a likely softball for someone.
>
> Consider the following data frame:
>
> #Create data
> x<-rep(c(1,15),10)
> y<-rnorm(20)
> z<-c(rep("auto",10),rep("bus",10))
Okay everyone heres a likely softball for someone.
Consider the following data frame:
#Create data
x<-rep(c(1,15),10)
y<-rnorm(20)
z<-c(rep("auto",10),rep("bus",10))
a<-rep(c(1,1,2,2,3,3,4,4,5,5),2)
#Create Data frame
Df<-data.frame(Source=x,Rate=y,Bin=a,Type=z)
I want to create a new column th
9 matches
Mail list logo