Anything starting with a # is not executed

You can add comments in R by prefixing them with #

Comments are extremely useful as you code. Consider them as love letters to your future self, to help you understand what you did a day, a week, a month, or even years ago!

# This is a comment
############ This is also a comment
# You can write whatever you want


2 + 2 # the words after "#" are a comment

This is not a comment and running this line will give you an error