[R] Read a Time Serie CSV

Patrick Hausmann patrick.hausmann at uni-bremen.de
Sun May 26 21:46:49 CEST 2002


Hi,

I want to read some Times Series of GDP from OECD-Countrys.
First I call:
> oecd96<-ts(read.csv("oecd96.csv",header=T,sep=";"),start=1950,freq=1)
> summary(oecd96)
    gdpcausb        gdpcautb        gdpcbelb        gdpccanb    
 Min.   : 8567   Min.   : 4533   Min.   : 6616   Min.   : 8966  
 1st Qu.:10771   1st Qu.: 8717   1st Qu.: 9440   1st Qu.:11694  
 Median :15196   Median :14590   Median :15605   Median :17612  
 Mean   :15387   Mean   :14331   Mean   :14994   Mean   :17102  
 3rd Qu.:19145   3rd Qu.:19404   3rd Qu.:19798   3rd Qu.:22121  
 Max.   :25818   Max.   :24828   Max.   :25252   Max.   :25923  
[...]
This is ok. But I can't plot a single variable by name. 

> plot(oecd96$gdpcausb)
Error in xy.coords(x, y, xlabel, ylabel, log) : 
        x and y lengths differ

This works:
plot(oecd96[,1])

What's my fault ?
Thanks for any help, 
Patrick Hausmann
-------------
Patrick Hausmann
Friedrich-Wilhelm Str. 37 - D-28199 Bremen
Tel. +49 421 5980631 - Fax. +49 421 5980632
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list