avoid packages in Depends section while building your own package

匆匆过客 提交于 2019-12-11 08:04:29

问题


To be clear I have read through the brilliant answer by JoshO'Brien here As mentioned in his edits, I have this exception case :

My package A uses a function f1() from package gamlss which is Dependent on gamlss.dist alongwith 2 other packages. So if I had Imported gamlss&gamlss.dist package and then called f1() then it would error out because gamlss.dist wasn't loaded in the NAMESPACE of gamlss since both were in Depends.( am i right in my understanding?)

So my question is , is there a way to avoid this error without having those 2 packages in Depends. (actually we might just need to have gamlss since it will load gamlss.dist by itself)

Basically my target is to avoid as much as possible in the Depends section. Let me know if more clarification is required.

来源:https://stackoverflow.com/questions/41853001/avoid-packages-in-depends-section-while-building-your-own-package

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