Bansal, Vikas <vikas.bansal <at> kcl.ac.uk> writes:

> I am using this-
> 
> aggregate(x = file[,3:6], by = list(file[,2]), FUN = "sum")
> 

  Better, although still not reproducible (please *do* read the posting
guide -- it is listed at the bottom of every R list post and is the
*first* google hit for "posting guide" (!); search for
"Examples").  What about removing the quotation marks around "sum"?

  aggregate(x = file[,3:6], by = list(file[,2]), FUN = sum)


> but I think this is not a right way.
> Because we cannot use "sum" to add.That is
>  why I was asking for help.

______________________________________________
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