Roxygen2 does not generate NAMESPACE correctly

I have a package that builds successfully without warning in Ubuntu 12.04. The package is pure R and has approximately 70 functions (approximately 2000 LOC). When I try to build under Windows 7 in Rstudio, the package builds successfully (no warnings), but NAMESPACE contains export () for only a dozen functions. The first time this happens to me, probably because I rarely use Windows. This happens under 3.1 and the latest version of Rstudio and roxygen2. Has this happened to any of you? What could be the reason for this?

+4
source share
1 answer

I have no idea if this is related to your problem (which I hope has been resolved since ...), but I had a similar problem, and it turned out that it was due to bad interactions with my awkward agreements about names

As a rule, I wrote functions with a name plot.XXX()where it XXXdescribes what needs to be done. Roxygen interpreted them as general function definitions for the S3 object system. XXXthen it was considered as a (not exportable) class with a function plot()and, accordingly, wrote a NAMESPACE file, which I did not expect. I suppose the same thing will happen for str.XXX(), summary.XXX()etc., or for XXX.data.frame(), etc. I did not have any of them, but that would make sense if that happened.

, ... S3/S4/S5!

0

Source: https://habr.com/ru/post/1539812/


All Articles