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
My guess is that one of your packages uses survey as a Suggested package.
And your calling a function from that package that uses survey via
Suggests.
Is your package on GitHub? Or could you share your Imports?
On Mon, Dec 2, 2024 at 12:09 Duncan Murdoch
wrote:
> On 2024-12-02 11:38 a.m., Cohen
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
On 2024-12-02 11:38 a.m., Cohen, Aaron wrote:
Hello,
I am trying to submit an R package to CRAN. There are no notes, comments or
errors when checking on my local machine, but I keep getting an error message
when submitting. I am attaching the log file, but basically the error occurs
when runn
Hello,
I am trying to submit an R package to CRAN. There are no notes, comments or
errors when checking on my local machine, but I keep getting an error message
when submitting. I am attaching the log file, but basically the error occurs
when running the examples. In particular, it says
Error