[Rd] Formal methods are not loaded from NAMESPACE in reloaded workspace image

Pfaff, Bernhard Dr. Bernhard_Pfaff at fra.invesco.com
Thu Nov 2 13:17:00 CET 2006


Dear R-Devel subscriber,

I was hinted to the following problem with package 'urca':

If one starts R and executes for instance:

> library(urca)
> example(ur.df)
## output as expected, but omitted here
> class(lc.df)
[1] "ur.df"
attr(,"package")
[1] "urca"
> class(summary(lc.df))
[1] "sumurca"
attr(,"package")
[1] "urca"
> 

everything works fine. Now, save the workspace image and quit R. After
starting R again with the previously restored workspace image one has:

> ls()
[1] "lc.df"   "Raotbl3"
> class(lc.df)
[1] "ur.df"
attr(,"package")
[1] "urca"

lc.df
## now the 'show'-method for objects of class 'ur.df' is not utilised,
rather the generic 
## displaying all slots

> library(urca)
> lc.df

## still the same as compared to the above output.
## similarily

> class(summary(lc.df))
[1] "table"


In the NAMESPACE file export directives for methods and classes are
included as:

## Classes       
exportClasses("urca", "ca.jo", "cajo.test", "ur.kpss", "ca.po",
"ur.ers", "ur.pp", "ur.sp", "ur.df", "ur.za", "sumurca")
## Methods
exportMethods("show", "plot", "summary")

Any help or pointers for solving this problem is much appreciated.

Best,
Bernhard

> sessionInfo()
R version 2.5.0 Under development (unstable) (2006-10-10 r39600) 
i386-pc-mingw32 

locale:
LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=
German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252

attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "datasets"  "utils"

[7] "base"     

other attached packages:
    urca fortunes 
 "1.0-0"  "1.3-2" 
*****************************************************************
Confidentiality Note: The information contained in this mess...{{dropped}}




More information about the R-devel mailing list