Re: [R] Fourier Transform fft help

2009-09-16 Thread delic
After extensive research I found some information hinting at my freq array being wrong. I thought that the data spanned -F/2 to F/2. It seems that I should only plot the first half of the fft vector? Can anyone confirm or shed some light on this? One other thing I thought the magnitude should be

Re: [R] Fourier Transform fft help

2009-09-16 Thread stephen sefick
why not try spectrum (power spectrum) spectrum(y, log="no") the major spike is at 0.1 and 1/0.1 = 10Hz On Wed, Sep 16, 2009 at 12:13 PM, delic wrote: > > I wrote a script that I anticipating seeing a spike at  10Hz with the > function 10* sin(2*pi*10*t). > I can't figure out why my plots  do not

[R] Fourier Transform fft help

2009-09-16 Thread delic
I wrote a script that I anticipating seeing a spike at 10Hz with the function 10* sin(2*pi*10*t). I can't figure out why my plots do not show spikes at the frequencies I expect. Am I doing something wrong or is my expectations wrong? require(stats) layout(matrix(c(1,2,3), 3, 1, byrow = TRUE))

Re: [R] Fourier Transform with irregularly spaced x

2008-11-03 Thread stephen sefick
neat. I learn something everyday On Mon, Nov 3, 2008 at 11:01 AM, Claudia Beleites <[EMAIL PROTECTED]> wrote: >> Try http://finzi.psych.upenn.edu/R/library/nlts/html/spec.lomb.html or >> http://finzi.psych.upenn.edu/R/library/cts/html/spec.ls.html (do >> RSiteSearch("Lomb periodogram") -- >> the

Re: [R] Fourier Transform with irregularly spaced x

2008-11-03 Thread Claudia Beleites
> Try http://finzi.psych.upenn.edu/R/library/nlts/html/spec.lomb.html or > http://finzi.psych.upenn.edu/R/library/cts/html/spec.ls.html (do > RSiteSearch("Lomb periodogram") -- > the Lomb periodogram does a discrete (although not fast) Fourier > transform of unevenly sampled (1D/time-series) data

Re: [R] Fourier Transform with irregularly spaced x

2008-11-03 Thread Ben Bolker
> Claudia Beleites units.it> wrote: > > Searching for discrete fourier transform I found lots of information and > > functions - but I didn't see anything that just works > > with irregularly spaced > > signals: all functions I found take only the signal, not its x-axis. > > > > Where should I l

Re: [R] Fourier Transform with irregularly spaced x

2008-11-03 Thread stephen sefick
You need to decide how you are going to interpolate the values. Look at the zoo package- na.approx() . spectrum() take the x axis and produces a power spectrum vs. cycles/time. you may interpret this however it makes ssnse- if it makes sense. On Mon, Nov 3, 2008 at 4:23 AM, Claudia Beleites <[

[R] Fourier Transform with irregularly spaced x

2008-11-03 Thread Claudia Beleites
Dear all, I work with (vibrational) spectra: some kind of intensity (I) over frequency (nu), wavelength or the like. I want to do fourier transform for interpolation, smoothing, etc. My problem is that the spectra are often irregularly spaced in nu: the difference between 2 neighbouring nu var

[R] FOURIER TRANSFORM HELP

2008-07-30 Thread renata.camargo05
Hello, I have a series and I need to run a Fourier Transform for that series. I have done that using the function fft from stats package. However I am not sure whether the result I am getting is correct or not. Seems that the first value of the Fourier Transform list is the sum of all elements

Re: [R] Fourier Transform

2008-06-05 Thread Foadi, J (James)
-Original Message- From: [EMAIL PROTECTED] on behalf of Neil Gupta Sent: Thu 6/5/2008 15:21 To: R-help@r-project.org Subject: [R] Fourier Transform Hello All, I wanted to perform a fourier transform on high frequency financial data. I have searched and have not found much on this topic

Re: [R] Fourier Transform

2008-06-05 Thread stephen sefick
If you want power spectral density then spec.pgram() and a wrapper to this spectrum should do the trick (MASS which is a part of R base I think) add the argument log="no" if you don't want to see the power on a log scale also remember that the smoothed periodogram is a consitent estimator of the sp

[R] Fourier Transform

2008-06-05 Thread Neil Gupta
Hello All, I wanted to perform a fourier transform on high frequency financial data. I have searched and have not found much on this topic for R. I was wondering if anyone has used any libraries for it or have come across any papers I may read. Many Thanks, Neil Gupta [[alternative HTML