[Rcpp-devel] rcmdcheck() failing on "Undocumented S4 class" with RCPP_Module

John Clarke john.clarke at cornerstonenw.com
Fri Oct 4 17:21:49 CEST 2024


Thanks Dirk,

Indeed roxygen2 docs will help with a workaround, I think. I've temporarily
added a Rcpp_MyClass-class.RD based on promptClass("Rcpp_MyClass") and that
seems to satisfy the R CMD check.

However, I feel my confusion comes from the (I think) RCPP-generated
*RCPP_MyClass* class. I don't explicitly declare that class name, it just
seems to appear magically in the R CMD warnings -- but is definitely
derived from my MyClass declaration. If this is the case, then I'm guessing
everyone who uses RCPP with a module in C++ would have the same issue and
they too will wonder how they should add documentation to the (duplicate)
RCPP_MyClass class. I believe this is a DRY violation -- we already have a
class declared and documented: the MyClass class, why should we also add
(duplicate) documentation for its magically created twin?

Maybe I'm missing something here -- I'm new to R and RCPP. Feel free to
ignore.

Thanks again,

-John


On Fri, Oct 4, 2024 at 4:50 PM Dirk Eddelbuettel <edd at debian.org> wrote:

>
> Hi John,
>
> That looks like a limitation in roxygen2 which appears to fully documented
> (as you desire) an S4 class.  As you may know, you prod roxygen2 with
> 'NULL'
> blocks to add extra documentation -- that is likely what you need here. The
> roxygen2 docs will have more on this.
>
> Cheers, Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20241004/184a7b03/attachment.htm>


More information about the Rcpp-devel mailing list