I will use underscores _
, not spaces to name your files. You can also use -
Avoid special symbols.
Called snake case.
my_file.qmd
my file!.qmd
syntax is how the code looks
variables should be in snake case and lower case
variables should be nouns
functions should be verbs
names should be meaningful and concise.
Don’t reuse built in R names (True, False, c, n)
Consider spacing and commas like in english writing.
More space for reability is ok. Don’t over do it.
Indent long lines (R does this automatically)
We don’t need return, R automatically returns the last line.
In general |>
and +
should end lines.
We will discuss these operators more later.