[R-SIG-Finance] error in plot() with fGarch object from saved .RData file
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> if I have a garchFit object 'gf' it will plot correctly
BGP> after fitting.
BGP> However, it will fail after reloading:
BGP> > plot(gf)
BGP> Error in as.double(y) :
BGP> cannot coerce type 'S4' to vector of type 'double'
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
If you do not want your coworker to load the whole package, you could
include the missing method and functions in the saved workspace.
Swiss Federal Institute of Technology
More information about the R-SIG-Finance