roxygen2 not generating NAMESPACE correctly

我与影子孤独终老i 提交于 2019-12-05 12:54:35

I have no idea if it's linked with your problem (which I hope have been solved since then...), but I just had a similar problem, and it turns out it was because of bad interactions with my clumsy naming conventions.

Typically, I wrote functions named plot.XXX(), where XXX describes what should be drawn. Roxygen interpreted them as generic function definitions for the S3 object system. XXX was then considered as a (non exported) class with a plot() function, and wrote the NAMESPACE file accordingly, which was not what I expected, of course. I suppose the same would happen for str.XXX(), summary.XXX(), etc., or for XXX.data.frame(), etc. I didn't have any of those, but it would make sense if it did.

In order to fix the problem, I just replaced my dots with underscores in the function names... and discovered a new world of possibilities with S3/S4/S5!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!