1

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.

Community
  • 1
  • 1
joel.wilson
  • 8,243
  • 5
  • 28
  • 48
  • @konvas if i have it in DEPENDS thwen no error at all. My motive was to avoid packages in Depends actually. would there be a way for it? – joel.wilson Jan 25 '17 at 16:37
  • if i have `gamlss` in the `Imports` then error throws out because `gamlss()` fom gamlss package is dependent on `gamlsss.dist` and since we `import`ed gamlss, `gamlss.dist` is not found in its NAMESPACE as even Josh mentions in his answer in above link – joel.wilson Jan 25 '17 at 17:01
  • ahh the answer that i was afraid to hear :( @konvas – joel.wilson Jan 25 '17 at 17:32
  • If you import a function that imports functions from other packages, those secondary dependencies are obviously required for installation and build but you do not have to mention them specifically. – Thomas Jan 25 '17 at 21:00

0 Answers0