Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 39
Basic arithmetic
ОглавлениеThe basic operators work as one would expect. Simply type in the R terminal 2+3
followed by ENTER
and R will immediately display the result.
addition product power
#addition 2 + 3 #product 2 * 3 #power 2**3 2∧3 #logic 2 < 3 x <- c(1,3,4,3) x.mean <- mean(x) x.mean y <- c(2,3,5,1) x+y