[R] Spectral Analysis

Uwe Ligges ligges at statistik.uni-dortmund.de
Sat May 18 09:19:48 CEST 2002


marcelo at leptocephala.lei.furg.br wrote:
> 
> Dear R users
> 
> Is there a function in R to make a peridogram for
> a spectral analysis of unevenlly sampled data??
> something like  spec.lomb() for S-Plus??

Neither of the S-Plus versions I have access to (4.5, 6.0) have got such
a function, or am I just missing it?
Do you want to generate a periodogram from the data printed below? Well,
if you think it will make sense ...


> How to plot a vector with unequally spaced time series??
> e.g
> day/month/year  V1
> 03/08/82        0.34
> 28/08/82        1.42
> 12/09/82        0.28
> 20/09/82        0.56
> 03/10/82        0.85
> 21/10/82        1.45

The appropriate plot functions can handle dates in time series very
well. 
At first take a look at packages like "date" and "chron".

Example:

 library(chron)
 DAT <- read.table(filename)
 DAT[[1]] <- as.chron(as.character(DAT[[1]]), format="d/m/y")
 plot(DAT[[1]], DAT[[2]])

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list