Re: [R] Restricting Decimal Places in the Output

2015-06-17 Thread PIKAL Petr
1] 235.2207116136 There are other ways to manipulate with printed digits. You can start with ?options Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Shivi82 > Sent: Wednesday, June 17, 2015 2:15 PM > To: r-help@r-project.org &

Re: [R] Restricting Decimal Places in the Output

2015-06-17 Thread Michael Dewey
Dear Shivi On 17/06/2015 13:15, Shivi82 wrote: Hi Petr, The solution you shared worked though it does not show any decimal values. The output is Group.1 x 11/1/2015309450 2 1/10/2015 332780 Instead of mean i used sum & i think that should be fine. aggr<-aggregate(retail

Re: [R] Restricting Decimal Places in the Output

2015-06-17 Thread Shivi82
Hi Petr, The solution you shared worked though it does not show any decimal values. The output is Group.1 x 11/1/2015309450 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

Re: [R] Restricting Decimal Places in the Output

2015-06-17 Thread PIKAL Petr
Hi > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Shivi82 > Sent: Wednesday, June 17, 2015 7:50 AM > To: r-help@r-project.org > Subject: [R] Restricting Decimal Places in the Output > > Good Morning All, > > I have worki

[R] Restricting Decimal Places in the Output

2015-06-16 Thread Shivi82
Good Morning All, I have working on a data set where I am finding mean and median for weight variable on a daily basis. The code: aggr<-aggregate(retail$weight,list(retail$ship.date),mean) This is giving me an accurate result however with 4 decimal places for the mean weight. In order to restric