Re: [R] How to use breaks argument in hist() function correctly?

2019-09-18 Thread Stephen Ellison
> When I had breaks = 18, I get total number of cells as 16, which is > same when I put breaks = 20 > > In the 2nd case I was expecting total number of cells (i.e. bars) as > 20 i.e. if I understand the documentation correctly I should expect > total number of cells (bars) should be same as breaks

Re: [R] How to use breaks argument in hist() function correctly?

2019-09-18 Thread Jim Lemon
Hi Cristofer, If you just ask for a number of breaks, you will get what "hist" thinks you should. Try this or something similar: hist(x,breaks=seq(min(x),max(x),length.out=21)) Jim On Wed, Sep 18, 2019 at 8:55 PM Christofer Bogaso wrote: > > Hi, > > I have a numerical vector as below > > x =

[R] How to use breaks argument in hist() function correctly?

2019-09-18 Thread Christofer Bogaso
Hi, I have a numerical vector as below x = c(92958.2014593977, -379826.025677203, 881937.411562002, 25761.5278163719, -11837.158273897, 48450.8089746788, -415505.62910869, -168462.98512054, 328504.255373387, -298966.051027528, 237133.794811816, -49610.1148173768, -92459.1170329526,