[R] Simple spectral analysis
Georg Hoermann
georg.hoermann at gmx.de
Mon Jan 8 17:12:34 CET 2007
Hello world,
I am actually trying to transfer a lecture from Statistica to
R and I ran into problems with spectral analysis, I think I
just don't get it 8-(
(The posting from "FFT, frequs, magnitudes, phases" from 2005
did not enlighten me)
As a starter for the students I have a 10year data set of air
temperature with daily values and I try to
get a periodogram where the annual period (365 days) should be clearly
visible (in statistica I can get the frequencies and the period).
I tried the spectrum() and pgram() functions, but
did not find a way through... The final aim would be to
get the periodogram (and the residuals from the reassembled data set...)
Thanks and greetings,
Georg
The data set:
air = read.csv("http://www.hydrology.uni-kiel.de/~schorsch/air_temp.csv")
airtemp = ts(T_air, start=c(1989,1), freq = 365)
plot(airtemp)
--
Georg Hoermann, Dep. of Hydrology, Ecology, Kiel University, Germany
+49/431/23761412, mo: +49/171/4995884, icq:348340729, skype: ghoermann
More information about the R-help
mailing list