Open bvreede opened 1 year ago
My two cents:
Exporting is already explained here: https://carpentries-incubator.github.io/lesson-R-packaging/documentation.html#the-export-field.
At most I think there could be another callout that distinguishes between load_all()
and install()
in the Documenting section.
here is an example of the distinction between
devtools::load_all()
anddevtools::install()
then try:
I am not sure what the difference between
devtools::install()
andBuild > Install > Clean and install
is. Both install the package locally. AfterBuild > Install > Clean and install
, I also get a message "Restarting R session" in the console, but I it seems to be thatdevtools::install()
does the same. In both cases, local variables and functions that I defined interactively are preserved after the process, which is a bit surprising to me.To cut a long story short, in line with the documentation of
devtools
I would suggest to mostly usedevtools::load_all()
, andinstall()
only "when necessary". I have no clear rules when exactly, but for instance after adding a new feature, corresponding tests and documentation, it makes sense toinstall()
and see what the package looks like for the user.Here are some useful insights:
What do you think?
Originally posted by @f-hafner in https://github.com/carpentries-incubator/lesson-R-packaging/issues/92#issuecomment-1408264508