Comment is important to improve readability for other users (and for yourself in a few weeks later!).
# A single line comment begins
Spacing is also important. Try not to make your code packed together.
Another tips is to use indentation. A short cut is Ctrl + I in RStudio.