Basic Data types and structures |
scalar == vector[0] |
true scalars |
|
vectors, (numerical, character, logical, factor) |
(string, integer, float, complex, boolean) |
|
arrays, == vectors (m x n) |
arrays (m x n) of scalars |
|
matrices, |
|
|
data frames, |
dictionary, |
|
and lists |
and lists |
Operators - arithmetic |
+ - * / |
+ - * / |
- exponent |
^ |
** |
- modulus remainder |
%% |
% |
- modular division |
%/% |
// |
- logical / boolean |
&, |, ! |
and, or, not |
- logical / comparison |
==, <, <=, >, >=, != |
==, <, <=, >, >=, != |
Flow Control |
|
|
- conditionals, decisions |
if-else, ifelse(), switch |
if, else, elif |
- Loops |
while(), for() |
while, for |