R uses common arithmetic operators you may have seen elsewhere:
Some of R's comparison operators differ from those in other languages:
Coordinate multiple comparison statements with logical operators:
The above operators work with statements that evaluate to TRUE or FALSE in R or with the values themselves:
R stores data in named objects.
Create an object by assigning data to a name. For clarity, it's conventional to assign with <-, but other operators exist:
Names are unique. If you assign to a new name, R creates a new object. If you assign to an existing name, the old object and its content disappear, replaced by your new assignment. Overwriting any object in R is that easy, so keep an eye on RStudio's auto-suggest box to see if a function or another object already has the name you plan to use.
Retrieve the content of an object by calling the object's name.
An object name is interchangeable with its content. Try it in your code.