Closed Robinlovelace closed 2 years ago
I think the .onAttach() message is a non-issue as we already follow best practice here:
Loading a namespace should where possible be silent, with startup messages given by .onAttach. These messages (and any essential ones from .onLoad) should use [packageStartupMessage](https://rstudio.robinlovelace.net/s/d5de8cf239dd2bbe73918/help/library/base/help/packageStartupMessage) so they can be silenced where they would be a distraction.
Hi Robin! I'm not sure if this is relevant, but I think the packageStartupMessage
should be included in .onAttach
not .onLoad
:
https://github.com/ropensci/stplanr/blob/9d4b416d891ae023b85141809216eb1ed41881d0/R/zzz.R#L1-L10
Hi Robin! I'm not sure if this is relevant, but I think the
packageStartupMessage
should be included in.onAttach
not.onLoad
:
Thanks for the tip but I'm not sure why you think that. From https://community.rstudio.com/t/when-to-use-onload-vs-onattach/21953 it seems that onAttach()
seems to trigger more frequently.