Skip to content
Prev 56704 / 398498 Next

Identifying time series

On Mon, 4 Oct 2004 09:00:46 -0400 John DeAngelis wrote:

            
You can read in such a file, e.g., via
R> x <- read.table(file = "mydata.txt", colClasses = c("character",
     "numeric"))
You can do that via strptime(), e.g.,

R> strptime(x[,1], "%Y%m%d")

(and possibly convert then to POSIXct or Date).

Then you can create an irregular time series, e.g. via package its or
via package zoo:

R> y <- zoo(x[,2], strptime(x[,1], "%Y%m%d"))
R> plot(y)

hth,
Z