Check various common "gotchas" in .onLoad()
, .onAttach()
, .Last.lib()
, and .onDetach()
namespace hooks that will cause R CMD check
issues. See Writing R Extensions for details.
Details
.onLoad()
shouldn't callcat()
,message()
,print()
,writeLines()
,packageStartupMessage()
,require()
,library()
, orinstalled.packages()
..onAttach()
shouldn't callcat()
,message()
,print()
,writeLines()
,library.dynam()
,require()
,library()
, orinstalled.packages()
..Last.lib()
and.onDetach()
shouldn't calllibrary.dynam.unload()
..onLoad()
and.onAttach()
should take two arguments, with names matching^lib
and^pkg
;.Last.lib()
and.onDetach()
should take one argument with name matching^lib
.
See also
linters for a complete list of linters available in lintr.