Skip to content
Prev 11078 / 12125 Next

[R-pkg-devel] [External] Re: Confusing error

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 you can wrap your example like:

if (rlang::is_installed(?survey?)) {
   Example code here
}
On Mon, Dec 2, 2024 at 13:17 Cohen, Aaron <cohenaa at iu.edu> wrote:

            

  
  
Message-ID: <CAL3ufULEYkUbr0yXQkzY-qO_E74+Mcane-Zsmc_D5nvDhUQ73A@mail.gmail.com>
In-Reply-To: <PH7PR08MB8379FB4B9FB766D6EA0ACAF2D3352@PH7PR08MB8379.namprd08.prod.outlook.com>