Re: [R] Need help on ploting Histograms

2009-05-21 Thread Richard . Cotton
> this is the command i made for a normal distribution, but when i try to plot > the histograms, i dont know why the bars don't stick on the line... > > nsamples<-1000 > sampsize<-15 > Samples<-matrix(rnorm(nsamples*sampsize,0,1),nrow=nsamples) > a<-apply(Samples,1,var) > NC14<-a*14 > x<-0:40 >

[R] Need help on ploting Histograms

2009-05-21 Thread Bonna
this is the command i made for a normal distribution, but when i try to plot the histograms, i dont know why the bars don't stick on the line... nsamples<-1000 sampsize<-15 Samples<-matrix(rnorm(nsamples*sampsize,0,1),nrow=nsamples) a<-apply(Samples,1,var) NC14<-a*14 x<-0:40 plot(x,dchisq(x,14),