Re: [R] feed cut() output into goodness-of-fit tests

2010-10-15 Thread Ista Zahn
On Fri, Oct 15, 2010 at 10:22 AM, Andrei Zorine zoav1...@gmail.com wrote: Hello, My question is assuming I have cut()'ed my sample and look at the table() of it, how can I compute probabilities for the bins? I actually don't know what you mean by this (my own ignorance probably). Do I have

Re: [R] feed cut() output into goodness-of-fit tests

2010-10-15 Thread Phil Spector
Andrei - Looking inside the code for cut, it looks like you could retrieve the breaks as follows: getbreaks = function(x,nbreaks){ nb = nbreaks + 1 dx = diff(rx - range(x,na.rm=TRUE)) seq.int(rx[1] - dx/1000,rx[2] + dx/1000,length.out=nb) } The dx/1000 is what makes cut()'s