Since you have dplyr as a dependency (though I’d reconsider that one since
it can be quite hefty / change it’s API) I would suggest using
rlang::check_installer(“survey”) in the function that indirectly calls
survey.
This will throw an informative error when survey is not found.
In your examples
Thank you [and Josiah Parry] for your help; I had already seen that PracTools
uses `survey` but only suggests it, and I was unsure what to do on my end since
I was getting in trouble whether I imported it or not. I will try doing what
you suggest.
Since the call to PracTools::deffCR is essentia
The PracTools::deffCR function calls survey::svydesign. It only
suggests the survey package, so it is not necessarily available.
What you could do is also suggest survey, then add a test for its
presence before calling PracTools::deffCR. Or if that call is
essential, then you should import s
Hello, thank you for getting back to me. I have a github with the code:
https://github.com/237triangle/surveynnet
The main code is in R/surveynnet.R.
Re: your suggestion, do you mean I should de-install the survey package? I will
try that, but would appreciate any additional help in the meantim