[R-pkg-devel] package build warning

Duncan Murdoch murdoch.duncan at gmail.com
Sun Jul 24 22:14:52 CEST 2016


On 24/07/2016 1:35 PM, Glenn Schultz wrote:
> All,
>
> I get the following warning using Roxygen2
>
> * checking for missing documentation entries ... WARNING
> Undocumented S4 classes:
>   ‘MortgageEffectiveMeasures’
>
> The code to create and document the class is below
>
>   #' An S4 class MortgageEffectiveMeasures
>   #'
>   #' A class of mortgage effective duration and convexity
>   #' @slot EffDuration A numeric value the Effective Duration
>   #' @slot EffConvexity A numeric value the Effective Convexity
>   #' @exportClass MortgageEffectiveMeasures
>   setClass("MortgageEffectiveMeasures",
>            representation(
>            EffDuration = "numeric",
>            EffConvexity = "numeric"
>          ))
>
> The constructor function works and returns the class with the expected result.  The constructor function is documented as well as the generics and the methods.  So, I am a little puzzled as to why I am getting this warning.
>
> I have tried removing all code and refactoring a code chunk at a time - no help
> I remove the @exportClass and as expected I pass RCMD
>
> I have looked at this and refactored it so many times if there is a mistake (and I missed it early on) I can no longer see it.  But it is a simple class and is fully documented in my package with the exception of the class.  Any suggestions as to where I should look next are be appreciated.

You need to look at the Rd files.  This might be your error, or a bug in 
Roxygen2, but the help system doesn't look in .R files for help, it 
looks in the .Rd files.  If none of them include

\alias{MortgageEffectiveMeasures-class}

then you haven't documented that class.

Duncan Murdoch



More information about the R-package-devel mailing list