s-news
[Top] [All Lists]

TimeSeries Data Manipulation

To: <s-news@lists.biostat.wustl.edu>
Subject: TimeSeries Data Manipulation
From: "Chen,Sichong" <sichong.chen@postgrad.manchester.ac.uk>
Date: Wed, 26 Apr 2006 07:45:36 +0800
Thread-index: AcZowlkAfJzggUkQSVqB89uc/ETiVw==

Dear Users

I have a silly question. How can I change a Time Series vector or matrix into a non-Time Series vector or matrix?

My problem is that I have one time series vector A (280*1) and one time series matrix B (280*3), which has the same time period. What I want to do is to combine these two together and create a new matrix (280*4) like rbind for the no-time series dataframe. Since rbind does not work for time series data, I tried to use B[,4] = A, but fails if it is, which says Problem in x[, j] <- value: Array subscript (2) out of bounds, should be at most 1. So I want to convert A, B back to non-time series object, combine and convert again.

Do you have some idea whats going wrong in my problem. I though it should not be that difficult and complicated to add one more column to a time series object.

Many thanks,

Sichong

SPlus 7.0 & FinMetrics 2.0 User

Windows XP

<Prev in Thread] Current Thread [Next in Thread>