[R-SIG-Finance] returns/timeSeries error message

Yohan Chalabi chalabi at phys.ethz.ch
Tue Nov 25 10:30:03 CET 2008


>>>> "JK" == J Konnonen <jkonn2001 at yahoo.com>
>>>> on Tue, 25 Nov 2008 01:16:00 -0800 (PST)

   JK> Hello,
   JK> 
   JK> I am trying to use some libraries (e.g. fGarch, fTrading) that require the library timeSeries. However, my code produces the following error message after loading the libraries
   JK> 
   JK> >     data(x)
   JK> >     f <- returns(window(x, from="1992-01-01", to="2003-12-31"))  
   JK> Error in getDataPart(<S4 object of class "timeSeries">) : 
   JK>   no '.Data' slot defined for class "timeSeries"
   JK> 
   JK> This code part worked without problems before using timeSeries
   JK> 
   JK> I couldn't figure out what could be the problem here. Any help would be very much appreciated.
   JK> 
   JK> Regards,
   JK> /Johan


Hi,

The timeSeries class has been updated with a new structure. From your minimal R output it looks like the old timeSeries class was loaded via the 'fSeries' package. 

Make sure that your packages are up-to-date and that you are using 'timeSeries' package and not 'fSeries'.

Note 'fGarch' or 'fTrading' load by default the new 'timeSeries' packages.

hope this helps,
Yohan

-- 
PhD student
Swiss Federal Institute of Technology
Zurich

www.ethz.ch



More information about the R-SIG-Finance mailing list