January 2010
Beginner
634 pages
19h 50m
English
R code is composed of a series of expressions. Examples of expressions in R include assignment statements, conditional statements, and arithmetic expressions. Here are a few examples of expressions:
> x <- 1 > if (1 > 2) "yes" else "no" [1] "no" > 127 %% 10 [1] 7
Expressions are composed of objects and functions. You may separate expressions with new lines or with semicolons. For example, here is a series of expressions separated by semicolons:
> "this expression will be printed"; 7 + 13; exp(0+1i*pi) [1] "this expression will be printed" [1] 20 [1] -1+0i
Read now
Unlock full access