Re: [R] runs.test in by() statement

2009-01-14 Thread David Winsemius
I always have trouble with "by" myself. I don't usually get an answer as quickly as I did here. I usually give up and move to "aggregate" or "ave". First I limited the data given to "by" in the first argument to just the variable under question. Then by the time R sends the information to

Re: [R] runs.test in by() statement

2009-01-14 Thread christiaan pauw
Thanks to Patric and Christian for swift and accurate help I still had to learn the differnce between calling a function and passing a call to a function. I had to coerce the first variable to be a function but then it worked. by(as.factor(exampledata$var), exampledata$interviewer, runs.test) Re

[R] runs.test in by() statement

2009-01-14 Thread christiaan pauw
Hi everybody I am a recent convert from SAS so please excuse me if this is all very obvious: I want to use the runs test {runs.test() in package tseries} to test the randomness of a certain variable in a survey for each interviewer. I tried to us the by() statement but it doesn't seem to work wit