+ 5
Basic calculations with R
The basic of R is that it works like a simple calculator. If you for example run this line of code: > 1 + 1 The console will give as output: 2 You can do the same for multiplying or dividing for example. Here is a short overview of the operators you can use for example: + adding, - subtracting, * multiplying / division
1 Respuesta
+ 2
Privalage to a part of your calculation can be given with adding ( ... ) for example to subtract 4 by 1 and then multiply by 3 run the following code:
> (4 - 1) * 3
The console will give as output:
9
Note: Without brackets the console will first multiply 1 by 3 and then substract from 4.