[R-pkg-devel] set generic and methods when slot is a function

2016-03-28 Thread Glenn Schultz
All, I am creating a mortgage prepayment model package. The idea is to create a class FRMModelFunction and each slot in the class is a function that may be use in the prepayment. So I would like to create a generic and method that will allow me to call the slot by name. However, I think that I

Re: [R-pkg-devel] set generic and methods when slot is a function

2016-03-28 Thread Kasper Daniel Hansen
This syntax Omega(x = 1) seems weird. How do you know that this call should refer back to the Model object and not some other hypothetical Model2 object? The code you're defining should make something like this work Omega(Model)(x=1) where you can see the direct dependence on the Model object

Re: [R-pkg-devel] “unable to find an inherited method” error in choroplethr package

2016-03-28 Thread arilamstein
Unfortunately I am still getting the same error: install.packages(c("choroplethr", "acs")) library(acs) api.key.install("f8b2a6df01479981aef39577b3c4466f5a4c8274") detach("package:acs", unload=TRUE) library(choroplethr) get_state_demographics() Error in (function (classes, fdef, mtable) :

Re: [R-pkg-devel] “unable to find an inherited method” error in choroplethr package

2016-03-28 Thread Uwe Ligges
I just tried your code with acs 2.0 and choroplethr 3.5.1 under R-3.3.0 alpha and got a result rather than an error... Are you using a different version of anything? Best, Uwe Ligges On 28.03.2016 22:49, arilamst...@gmail.com wrote: Unfortunately I am still getting the same error: install.

Re: [R-pkg-devel] “unable to find an inherited method” error in choroplethr package

2016-03-28 Thread arilamstein
I am using R 3.2.4 for mac. Here is my sessionInfo(): > sessionInfo() R version 3.2.4 (2016-03-10) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.10.5 (Yosemite) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats g

Re: [R-pkg-devel] set generic and methods when slot is a function

2016-03-28 Thread Glenn Schultz
Kasper, Thanks! I that was the clue I was looking for. Simple change to the code makes it work perfectly as you describe. I also have constructor function for Model beyond the minimal example. I also like you reference to Bioconductor as that is the model I am trying to follow. Glenn setG