[R] Restricting Decimal Places in the Output
Shivi82
shivibhatia at ymail.com
Wed Jun 17 14:15:14 CEST 2015
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.
More information about the R-help
mailing list