<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi All,<div><br></div><div>I've been working on an Rcpp based package (for the better part of a year and a half now), and have a few issues that I was hoping I could get some help with.</div><div><br></div><div>As a bit of background, this package fits (via MCMC-MLE) exponential family random graph models (ergm), markov random field models, and a new generalization of the two (un-creatively titled) exponential random network models (ernm). More full info on the math is available at [1], and some obtuse notes toward a vignette are at [2]. You can download the package source from [3].</div><div><br></div><div>The package uses Rcpp modules extensively to pass large C++ objects up and down between R and C++ transparently, and with no deep copies. </div><div><br></div><div>Problem 1: on R CMD check I get a namespace loading warning. I believe this was discussed on list some time ago, but there wasn't a resolution offered that I could see. I tried adding imports(methods) to the namespace, to no avail. The warning is:</div><div><br></div><div><div>** checking whether the namespace can be loaded with stated dependencies ... WARNING</div><div>Error in value[[3L]](cond) : failed to load module ernm from package ernm</div><div>could not find function "getClass"</div><div>Error: .onLoad failed in loadNamespace() for ‘ernm’, details:</div><div>  call: fun(libname, pkgname)</div><div>  error: could not find function "initErnmStatistics"</div><div>Execution halted</div></div><div><br></div><div>Problem 2: I want to make the package extensible so that other packages can extend the C++ classes, and so that they can be used via inline. I tried to make an inline plug-in (see: inline.R), but have gotten stuck. Any guidance here is appreciated.</div><div><br></div><div>Problem 3: This isn't an Rcpp question per se, but… I have some C++ tests in a subdirectory of src (src/tests), I would like to export them to R so that they can be run on R CMD check but R doesn't seem to be compiling them correctly. How do I modify MakeVars to compile the subdirectory?</div><div><br></div><div>Any comments on the code itself are also more than welcome. It is still very much research code, so I'm sure that there are many ways to break it.</div><div><br></div><div>Best,</div><div>Ian</div><div><br></div><div><br></div><div><br></div><div><div>[1] <a href="http://fellstat.com/files/ifellows.pdf">http://fellstat.com/files/ifellows.pdf</a></div><div>[2] <a href="http://fellstat.com/files/ernm.pdf">http://fellstat.com/files/ernm.pdf</a></div><div>[3] <a href="http://fellstat.com/files/ernm_1.0.tar.gz">http://fellstat.com/files/ernm_1.0.tar.gz</a></div></div></body></html>