is there any way to display a message when a user loads library(myCustomLibrary)?
Upon loading, I want to display a message that tells the user how to run all the test functions.
is there any way to display a message when a user loads library(myCustomLibrary) ?
Share
Yes. You can use the
.onLoad,.onAttach, or.First.libfunctions to do whatever you want when the package is loaded. I suggest looking at the help for those functions. You would use.onLoadwith a namespace, and.First.libwithout.One convention is that people will frequently put these commands in a separate
zzz.Rfile, which is just used for package related code.