carpentries-incubator / lesson-R-packaging

R Packaging
https://carpentries-incubator.github.io/lesson-R-packaging/
Other
5 stars 10 forks source link

Explicitly discuss the need for function-only in R files #90

Open bvreede opened 1 year ago

bvreede commented 1 year ago

A lot of errors in the last installment were caused by people having scripted code outside of their functions in the .R files. We need to emphasize as early as possible that this is not good, and the kind of errors they can expect if this is the situation.

Preferably in the earliest chapters: write some code outside the function (code should throw an error, that's even clearer), and then check/build the package.