You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Those rules all sound reasonable to me, except: "Variable and function names should be lowercase. Use an underscore _ to separate words within a name." That's okay if you take that approach, but isn't necessary.
@pcarbo Thanks! I think the most important part is being "consistent", especially working with others; i find the following two points from Wickham really helpful:
You don’t have to use my style, but I strongly recommend that you use a consistent style and you document it.
If you’re working on someone else’s code, don’t impose your own style. Instead, read their style documentation and follow it as closely as possible.
in my case i ll need to study Nick's existing style and try to be consistent
Below is a check list of guidelines on files in
R/
from Wickham's package book: http://r-pkgs.had.co.nz/r.html_
to separate words within a name.library()
orrequire()
. Use theDESCRIPTION
to specify your package’s requirements.source()
to load code from a file. Rely ondevtools::load_all()
which automatically sources all files inR/
.on.exit()
:options()
,par()
andsetwd()
.onAttach()
for startup message.packageStartupMessage()
, and notmessage()
.options()
..onLoad()
, consider using.onUnload()
to clean up any side effects..R
files."\u1234"
format is to usestringi::stri_escape_unicode()
.The text was updated successfully, but these errors were encountered: