[R-pkg-devel] package build warning
Glenn Schultz
glennmschultz at me.com
Mon Jul 25 00:29:20 CEST 2016
check on Generate documentation with Oxygen
check devtools::document() does not create the man/MortgageEffectiveMeasures-class.Rd
I can share my sources but I am not sure the base way to go about. It is on github in a private repo which I can provide access or ssh key
Glenn
> On Jul 24, 2016, at 4:56 PM, Kevin Ushey <kevinushey at gmail.com> wrote:
>
> If you're using RStudio, have you enabled 'Generate documentation with
> Roxygen' in your Project Options?
>
> Can you confirm whether manually invoking 'devtools::document()'
> creates a file at 'man/MortgageEffectiveMeasures-class.Rd', with the
> expected documentation?
>
> Everything looks fine for me with your example code in a dummy
> package, so if you're still seeing an issue you're going to need to
> share your package sources or an otherwise reproducible example.
>
> Kevin
>
> On Sun, Jul 24, 2016 at 2:37 PM, Glenn Schultz <glennmschultz at me.com> wrote:
>> Duncan is correct the class is not documented but the generics, methods, and constructor functions are documented. Kevin, I updated both devtools and Roxygen2 with the same issue. I am using R Studio. I tried refactoring around some functions and files whose names were close in the event that there may be some conflict. For now, it is just a warning soI will keep looking for the problem and if I can solve it post back here as it must be quite subtle given all else is working fine.
>>
>> Glenn
>>
>>
>>> On Jul 24, 2016, at 3:27 PM, Kevin Ushey <kevinushey at gmail.com> wrote:
>>>
>>> Did you call `devtools::document()` before building and checking your
>>> package? Everything looks fine to me with your test example. You
>>> should also double-check that you have up-to-date versions of the
>>> devtools and roxygen2 packages.
>>>
>>> It's also worth knowing that nowadays you can generally just use
>>> `@export` and roxygen2 will do the right thing, depending on what
>>> object you are trying to export.
>>>
>>> On Sun, Jul 24, 2016 at 10:35 AM, Glenn Schultz <glennmschultz at me.com> 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.
>>>>
>>>> Best,
>>>> Glenn
>>>>
>>>> ______________________________________________
>>>> R-package-devel at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>>
More information about the R-package-devel
mailing list