[R] How can I make a list using aggregate function?

John Kane jrkrideau at inbox.com
Thu Jun 28 15:40:41 CEST 2012


data?  We really should see some sample data.  See ?dput for a way to supply some.

John Kane
Kingston ON Canada


> -----Original Message-----
> From: sureshmallikaraj at gmail.com
> Sent: Thu, 28 Jun 2012 01:58:30 -0700 (PDT)
> To: r-help at r-project.org
> Subject: [R] How can I make a list using aggregate function?
> 
> Hi friends,
> 
>    I need to generate a list, that should contain the quantile value of
> one
> column in a data frame. while I am compiling this one i am facing one
> bug,,
> Really I cannot find out that where the problem has occurred?  Could any
> one
> help me to come out from this bug??
> 
> Here is the code,
> data <- lapply(comb.data$zFE, function(x) aggregate(x,
> by=list(comb.data[["sequence"]]), quantile, probs=c(0.5,0.8,0.9),
> na.rm=T))
> 
> And I am facing bug like this,
> "Error in aggregate.data.frame(as.data.frame(x), ...) :
>   arguments must have same length"
> 
> Thanks,
> Suresh
> 
> --
> View this message in context:
> http://r.789695.n4.nabble.com/How-can-I-make-a-list-using-aggregate-function-tp4634714.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.

____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!



More information about the R-help mailing list