Message-ID: <59b416d2-e66c-250b-c610-90d84b368625@gmail.com>
Date: 2016-07-24T20:14:52Z
From: Duncan Murdoch
Subject: [R-pkg-devel] package build warning
In-Reply-To: <58A556E1-B5BC-455D-BAC3-54F435E90269@me.com>
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