Hi Petr, The solution you shared worked though it does not show any decimal values. The output is Group.1 x 1 1/1/2015 309450 2 1/10/2015 332780
Instead of mean i used sum & i think that should be fine. aggr<-aggregate(retail$weight,list(retail$ship.date),function(x) round(sum(x,0))) So if i change above code to x,1 it changes values to Group.1 x 1 1/1/2015 309451 2 1/10/2015 332781 Thanks, Shivi -- View this message in context: http://r.789695.n4.nabble.com/Restricting-Decimal-Places-in-the-Output-tp4708739p4708755.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.