Re: [R] Simple question on binning data

2010-05-15 Thread Bernardo Rangel Tura
On Thu, 2010-05-13 at 17:31 -0400, Carl Witthoft wrote: It's very simple to write a binit() function. If all you want to do is e.g., bin 107 values into sums of 10 at a time, then write a loop that sums x[10*i:11*i-1] (not tested and not syntactically correct). The one I wrote for myself

Re: [R] Simple question on binning data

2010-05-14 Thread kMan
Wow! This definitely contributed to my evening. If you could indulge, I would like some clarification on this matter of binning and distortion, particularly wrt time series (perhaps related to long-memory processes?). I had thought binning was standard practice in spectral analysis and ANPOW.

Re: [R] Simple question on binning data

2010-05-14 Thread Frank E Harrell Jr
On 05/14/2010 07:35 PM, kMan wrote: Wow! This definitely contributed to my evening. If you could indulge, I would like some clarification on this matter of binning and distortion, particularly wrt time series (perhaps related to long-memory processes?). I had thought binning was standard

[R] Simple question on binning data

2010-05-13 Thread george5000
Hello everyone, I have a data set, and I need to bin my data using a bin width of say g(n). Would anyone be willing to tell me how to do this in R? Thanks -- View this message in context: http://r.789695.n4.nabble.com/Simple-question-on-binning-data-tp2202644p2202644.html Sent from the R help

Re: [R] Simple question on binning data

2010-05-13 Thread Erik Iverson
There would be several people who could help if you gave us a minimal, reproducible example like the posting guide asks for. If you have a vector of continuous data, and need to create a categorical variable (in R, a factor) from that continuous variable, then ?cut can help you.

Re: [R] Simple question on binning data

2010-05-13 Thread Frank E Harrell Jr
@r-project.org Subject: Re: [R] Simple question on binning data There would be several people who could help if you gave us a minimal, reproducible example like the posting guide asks for. If you have a vector of continuous data, and need to create a categorical variable (in R, a factor) from

Re: [R] Simple question on binning data

2010-05-13 Thread Rolf Turner
On 14/05/2010, at 9:54 AM, Frank E Harrell Jr wrote: SNIP snip Binning is seldom needed and usually distorts. It is the statistical equivalent of a former governor from Alaska. SNIP I nominate this for a fortune. cheers, Rolf Turner

Re: [R] Simple question on binning data

2010-05-13 Thread Dennis Murphy
I second it! Made me lol :) Dennis On Thu, May 13, 2010 at 3:03 PM, Rolf Turner r.tur...@auckland.ac.nzwrote: On 14/05/2010, at 9:54 AM, Frank E Harrell Jr wrote: SNIP snip Binning is seldom needed and usually distorts. It is the statistical equivalent of a former governor from