I've converted the bdsmatrix package (used by coxme) to the newer style of S4, and uploaded it. It is in the pkg directory of survival, on r-forge. I'm stuck on something that is almost certainly a namespace issue. I've borrowed liberally from Matrix (a big help) and read the documentation, and just upgraded to 2.8.1 - but still stuck. All the tests work when I run them "by hand", but tests/gchol2.R fails when run from R CMD check. The failure looks a lot like a method for setMethod('diag', 'gchol') is not being found. The NAMESPACE file exports diag, along with several other methods that do work. Any help would be appreciated. Terry Therneau
Terry, 1. R CMD build on your package reports at least two warnings for me. 2. R CMD check gives dozens of warnings even before the test cases where it already stops in gtest.R rather than anaything called gchol2.R. 3. There is no tests/gchol2.R !!! Perhaps you want to clean up some other issues or update the svn repository before you post again? Best wishes, Uwe Terry Therneau wrote:> I've converted the bdsmatrix package (used by coxme) to the newer style of > S4, and uploaded it. It is in the pkg directory of survival, on r-forge. > I'm stuck on something that is almost certainly a namespace issue. I've > borrowed liberally from Matrix (a big help) and read the documentation, and > just upgraded to 2.8.1 - but still stuck. > > All the tests work when I run them "by hand", but tests/gchol2.R fails > when run from R CMD check. The failure looks a lot like a method for > setMethod('diag', 'gchol') > is not being found. > > The NAMESPACE file exports diag, along with several other methods that > do work. Any help would be appreciated. > > Terry Therneau > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
> 2. R CMD check gives dozens of warnings ...Yes, I see a lot of warnings too, but I think that they can and should be ignored. 1. There is a set where the generic function has "..." and my realization of the generic has a named argument. But this is exactly what the ... is for in a generic! 2. Undocumented objects and classes. I have a couple to fill in, agreed. But I don't agree with CMD check's admonition to add a page for every instance of a method. For instance diag() for a bdsmatrix is no different than for any other matrix, so what is there to document? I'm willing to be corrected on this. 3. The 00install.out file showed one mismatched brace in one .Rd file. I'll fix that. 4. The 00check.log file gives a WARNING that the src directory contains object files. This is very odd, since the CMD check process itself put them there. ---> .... before it stops in gtest.R. There is no gchol2.R!This was my mistake in the original message. It perhaps comes from trying to send something out as I was heading for the door. My apologies. To reprise, my problem was a test (gtest.R) that ran perfectly when the code was local, but failed when it was attached as a library. To understand the error better I used R CMD INSTALL to create a local library and ran the tests there. The problem was not diag() as I had supposed but as.matrix.gchol. I had forgotton one S3method line in the NAMESPACE file. The library now loads and tests correctly. Terry T.
Duncan, When The generic solve method has "(a, b, ...)" I have "solve.gchol(a, b, full=TRUE, ...)" I was assuming that I would still get an error from CMD check. These are the ones that I argued as "unavoidable". But... I just checked, and none of those were the squawkers, only the few where I negelected to put the ... in my function. So I stand corrected again. Your argument for inclusion of ... when the generic contains it is persuasive. Undocumented objects: I have messages about %*%, ], dim, dimnames, and diag; all of which did not have optional arguments. I wrote manual pages for those generics that did, like solve, but see less use for those that don't. I could add them to the class definition page though. Again, thanks to all for their help. Terry T.