Dear list, I am trying to pass data frame colnames through ddply without sucess.
Here is my command: >exportfile<-ddply(exportfile,c("Product","Price"),summarise,Nbr.Lots=sum(Filled.Qty)) exportfile is a df. I want to apply summarise to Product and Price columns and sum the Filled.Qty column and renamed it Nbr.Lots. This line works. What I would like is changing the col names in the same line, thus avoiding another line with >colnames(exportfile)<-c("Contract","Price","Nbr.Lots") Is there a possibility to change my col names in the same line? TY Arnaud Gaboury A2CT2 Ltd. ______________________________________________ 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.