[Rd] Package issue

Duncan Murdoch murdoch at stats.uwo.ca
Mon Mar 9 18:24:24 CET 2009


On 3/9/2009 11:29 AM, Terry Therneau wrote:
>> 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!  

This could cause trouble for users.  If the generic has a ... arg, a 
user has been promised that they can use any arguments there.  You might 
want it to be an error to use an arg that isn't supported by the 
particular class the user has, but it's better just to ignore the extra 
args (and document that you'll do that), rather than raise an error when 
a user uses one.


>   
>   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?

You can just point to the diag.Rd page in your documentation.  In this 
case, that's a little inconvenient because you didn't write the generic, 
so you do need a whole page for diag.bdsmatrix.  (That page can handle 
lots of other methods for standard generics too.)  But if you had 
written the generic, it's simply a matter of adding another couple of 
lines to the generic's page.  It's useful, because it gives you a chance 
to document which optional parameters are supported by your particular 
method.

>   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.

You can ignore this error if you don't get it when checking the source 
tarball.  If you get it there, that's not ignorable.  (I think R-forge 
checks the directory rather than the tarball, not sure what Uwe does.)

Duncan Murdoch

> ---
> 
>> .... 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.
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list