[R] help:simple bin problem histogram

Jim Lemon bitwrit at ozemail.com.au
Fri Oct 28 15:21:50 CEST 2005


sp219 wrote:
> Hi,
> I cannot seem to change the default binning settings for the x axis 
> successfully using hist(). I have tried using axis() in conjunction with 
> xaxt="n", but I keep getting the error message
> Warning message:
> parameter "vect" could not be set in high-level plot() function
> can anyone help please?
> 
Hi Simon,

I didn't see a reply, but I think you want to use "breaks"

x<-sample(1:100,200,TRUE)
hist(x)
hist(x,breaks=seq(0,100,by=20))

Jim




More information about the R-help mailing list