Data Types & Operators
Data Types & Operators
Scientists with R
Class 02: Data Types & Operators
• When working with multiple elements of a data type, use the function c() to
combine multiple elements.
Operators Example
x <- 10
<-
y <- c(3, 2)
-> 10 -> x
= X = 10
<<- x <<- 10
->> 10 ->> x
== Equal 3 == 5 FALSE
& And
| Or
! Not
Note: Relational operators compare values and return either TRUE or FALSE. Logical operators perform logical
operations on TRUE and FALSE.
Group Functions
sum(), mean(), min(), max(), median(),
Statistical
quantile(), sd(), range(), summary()