[R-SIG-Finance] error in plot() with fGarch object from saved .RData file

Yohan Chalabi chalabi at phys.ethz.ch
Tue Jul 28 22:01:06 CEST 2009


>>>> "BGP" == "Brian G. Peterson" <brian at braverock.com>
>>>> on Tue, 28 Jul 2009 14:08:41 -0500

   BGP> On Windows, R saves your workspace automagically on quitting
   BGP> in a file
   BGP> in the working directory called .RData
   BGP>
   BGP> if I have a garchFit object 'gf' it will plot correctly
   BGP> immediately
   BGP> after fitting.
   BGP>
   BGP> However, it will fail after reloading:
   BGP>
   BGP> > plot(gf)
   BGP> Error in as.double(y) :
   BGP> cannot coerce type 'S4' to vector of type 'double'

Hi Brian,

I suspect that you did not load 'fGarch' before trying to plot your
saved object 'gf'. You are thus missing plot,fGARCH-method and related
functions.

If you do not want your coworker to load the whole package, you could
include the missing method and functions in the saved workspace.

HTH
Yohan

-- 
PhD student
Swiss Federal Institute of Technology
Zurich

www.ethz.ch



More information about the R-SIG-Finance mailing list