Now we have fully introduced the first object—-vectors. You have learned how to create vectors and apply various operations on them. There are several different types of operators to conduct different operations in R. In this section, we want to give you a brief review of some operators and operations according to their types.
Let’s summarize the four types of operators we have learned. In the following parts, we will review each type one by one.
Arithmetic operators (Section 1.2) are operators that often used to some basic calculations. The following is a list of operators available in R.
The assignment operator (Section 1.3) is the perhaps the most fundamental operator. It can help you to create objects with names.
|<-||do object assignment|
Relational operators are operators that are often used to do comparisons. The following is a list of operators available in R.
|<=||less than or equal to|
|>=||bigger than or equal to|
|!=||not equal to|
Logical operators are often used between two logical vectors when we want to do a particular vector subsetting. The following is a list of logical operators available in R.
In addition to using various operators to conduct operations, we can do much more using various functions in R.