Re: [R] changing names numeric to a time series

2010-07-16 Thread Gabor Grothendieck
On Fri, Jul 16, 2010 at 11:26 AM, Erin Hodgess wrote: > Dear R People: > > What is the best way to change a named numeric (in which the names are > dates) to a time series, please? > >> str(y1) >  Named int [1:730] 102 145 147 120 132 125 137 103 128 130 ... >  - attr(*, "names")= chr [1:730] "200

[R] changing names numeric to a time series - solved

2010-07-16 Thread Erin Hodgess
Here is the original question: What is the best way to change a named numeric to a time series > str(y1) Named int [1:730] 102 145 147 120 132 125 137 103 128 130 ... - attr(*, "names")= chr [1:730] "2006-01-01" "2006-01-02" "2006-01-03" "2006-01-04" ... > y2 <- zoo(y1,order=names(y1)) Perfec

[R] changing names numeric to a time series

2010-07-16 Thread Erin Hodgess
Dear R People: What is the best way to change a named numeric (in which the names are dates) to a time series, please? > str(y1) Named int [1:730] 102 145 147 120 132 125 137 103 128 130 ... - attr(*, "names")= chr [1:730] "2006-01-01" "2006-01-02" "2006-01-03" "2006-01-04" ... > Thanks in adv