[R] Inputing data from multiple files as time series objects

Constantine Tsardounis costas.magnuse at gmail.com
Fri Nov 11 15:07:40 CET 2005


Hello to everyone,...

I am a new R ambitious user. I would like to be the first at my
department using R, but I have encountered a difficulty during the
last days that I cannot overcome reading help() and searching over the
net.
Problem:
I have multiple files with financial data like the following (header included):
E.g.:
filename: AOL.txt
aol.txt
4
3
5
3...

filename: IBM.txt
ibm.txt
6
2
5
2...

I would like to input these data in R as time-series objects with
their corresponding names automatically, so that I can manipulate them
(exempli gratia plot acf, pacf, differntiate them, make adf tests,
etc)
For example: I could do that by hand using:
AOL <- ts(read.table(AOL.txt, header = TRUE))))
IBM <- ts(read.table(IBM.txt, header = TRUE))))
but is there another way to achieve the same actions as above with a
more versatile way? (for example loops?)
Or would you suggest inputing these data with another way or as other objects?

Thank you very much in advance,...

Tsardounis Costas




More information about the R-help mailing list