[R] which data structure for a set of time series ?

From: Roolio <roolio4news_at_gmail.com>
Date: Fri 07 Jul 2006 - 03:42:38 EST

I'm a R newcomer and I'm wondering the kind of data structure that would best fit to my problem:
my data are equities (stocks) : so I have a time serie (say 1 year of weekly data), and a bunch of qualitative + quantitative variables : the sector of the stock (biotech/finance...), the geographical region, the name, ISIN code, P/E ratios, whatever...

The data.frame is perfect for the qualitative variables : a row is a stock, a column is a variable .
But where can I store the time serie? If I put each weekly data in a column of the data frame
, I'm not sure that it's the best structure when I will want to test some models on these
I would prefer to have a new data frame, where each column is a stock, each row a date, to do the regressions (across time more easily)

So I would end up with 2 data frames, one of each transposed... No good, probably.

I thought of a set of 2 objects : 1 data frame (for the qualitative variables), and one list of time series, in the same order, with the risk of

forgetting to subset one objet and not the other, etc...

Do you happen to have the same kind of problem? Is there something equivalent in R as the matlab 'structures' ? (kinda R data frame, where you can store multi-dimensional objects in a column)

Many thanks in advance.



        [[alternative HTML version deleted]]

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 Fri Jul 07 03:46:15 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 14 Jul 2006 - 04:14:18 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.