Re: [R] using spec.pgram

2008-06-17 Thread Anthony Mathelier
Even if the signal given by the histogram is not really a signal, it seems that spec.pgram can give an interesting evaluation of how the genes are spaced in the chromosome, like in the article. So now, when I study a chromosome with 200 interesting genes, I would like to compare the amplitude of th

Re: [R] using spec.pgram

2008-06-16 Thread Anthony Mathelier
OK, it seems like I do not succeed in expressing what I do, or want to do. So, I give you the example that bring me to this kind of analysis. I wrote the paper "Chromosomal periodicity of evolutionary conserved gene pairs" (which you can download at http://www.pnas.org/cgi/reprint/104/25/10559). In

Re: [R] using spec.pgram

2008-06-16 Thread stephen sefick
To get some sort of frequency which in your case seem to be cycles per distance? Is a valid use of a fourier transform as long as it is a distance that is measured in a way that would be analogous to a time series- In other words if the distance proceeds from an origin in one direction- geophysic

Re: [R] using spec.pgram

2008-06-16 Thread Anthony Mathelier
Perhaps I'm applying spec.pgram wrong as you said. I will explain what I want, so you can tell me why I'm wrong and perhaps what I have to do to do it well. I have some points in a 1-D space and I want to know if they are spaced at a certain periodic distance. So, I computed all the distances betwe

Re: [R] using spec.pgram

2008-06-10 Thread stephen sefick
I from a first thought I would say that you are apply this wrong! The fourier transform convolves a function (cos(x)+isin(x) (this may not be the exact formula but I don't have my books near)) to the data and then integrates over -1/2 to 1/2 takes the modulus and plots this- the periodogram. The

Re: [R] using spec.pgram

2008-06-10 Thread Matthieu Stigler
Hello I don't know exactly what you want to do but: -why do you use in your example h$counts and not h? Furthermore helpl file says it should be a time series, why then rather not your time series? -usually na.action will make the "default" action, which you can see by getOptions("na.action"

[R] using spec.pgram

2008-06-09 Thread Anthony Mathelier
Hi everyone, first of all, I would like to say that I am a newbie in R, so I apologize in advance if my questions seem to be too easy for you. Well, I'm looking for periodicity in histograms. I have histograms of certain phenomenons and I'm asking whether a periodicity exists in these data. So, I