[R] problem with as.timeSeries()

From: Wojtek Slusarski <slusek_at_o2.pl>
Date: Sat 14 May 2005 - 08:39:06 EST


The matrix I want to convert to timeSeries object looks:

                       rp
2003-06-30 -1.0995685137
2003-07-01 -0.7065834677

2003-07-02 0.7661757181
  and so on...

In help it is stated that I should use as.timeSeries function like:

as.timeSeries(x, dimnames = TRUE, format = "")

So I try:
> ts.rp = as.timeSeries(rp, dimnames=TRUE, format="%Y-%m-%d")
Error in "colnames<-"(`*tmp*`, value = character(0)) :

         attempt to set colnames on object with less than two dimensions

I don't exactly understand the error as:

> dim(rp)

[1] 249 1

What am I doing wrong?

Best regards,
Wojtek



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat May 14 08:42:56 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:45 EST