Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

summary.mle2 is sometimes not accessible #124

Closed
andrechalom opened this issue May 30, 2016 · 2 comments
Closed

summary.mle2 is sometimes not accessible #124

andrechalom opened this issue May 30, 2016 · 2 comments

Comments

@andrechalom
Copy link
Member

The summary.mle2 is back to haunt us. As of sads v0.3.1, the summary of the fitsad and fitrad classes are done with

setClass("summary.sads", representation("summary.mle2", fixed="numeric"))

The problem here is that summary.mle2 is not exported by bbmle. However, the code with the line above loads without errors, passes CRAN checks and works in a way that's completely compatible with the expectations. Unless you try to load the package again in the same R session:

> load_all()
Loading sads
### Loads with no errors
> load_all()
Loading sads
Error in reconcilePropertiesAndPrototype(name, slots, prototype, superClasses,  (from sads-classes.R#32) : 
  no definition was found for superclass “summary.mle2” in the specification of class “summary.sads”
@piklprado
Copy link
Contributor

Yeah, I noticed that. But because this discussion

r-lib/devtools#623

I thought it was a devtools issue. So I am surviving detaching sads before calling load_all:

> load_all("../pkg/sads")
Loading sads
Loading required package: bbmle
Creating a generic function forpointsfrom packagegraphicsin packagesadsCreating a generic function forlinesfrom packagegraphicsin packagesadsCreating a generic function forcoefficientsfrom packagestatsin packagesadsCreating a generic function forfitted.valuesfrom packagestatsin packagesadsCreating a generic function forfittedfrom packagestatsin packagesads> search()
 [1] ".GlobalEnv"        "package:sads"      "package:bbmle"    
 [4] "devtools_shims"    "package:stats4"    "package:devtools" 
 [7] "ESSR"              "package:stats"     "package:graphics" 
[10] "package:grDevices" "package:utils"     "package:datasets" 
[13] "package:methods"   "Autoloads"         "package:base"     
> detach(pos=2, unload=TRUE)
> load_all("../pkg/sads")
Loading sads
Creating a generic function forpointsfrom packagegraphicsin packagesadsCreating a generic function forlinesfrom packagegraphicsin packagesadsCreating a generic function forcoefficientsfrom packagestatsin packagesadsCreating a generic function forfitted.valuesfrom packagestatsin packagesadsCreating a generic function forfittedfrom packagestatsin packagesads

@andrechalom
Copy link
Member Author

OK, if this is the case, then it should be safe to ignore this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants