版权归作者所有,转载请注明出处
Basic Statistics R lab - Getting started (part 1)
Little arithmetics with R
In its most basic form R can be used as a simple calculator. Consider the following arithmetic operators:
Addition: +
Subtraction: -
Multiplication: *
Division: /
Exponentiation: ^ The ^ operator raises the number to its left to the power of the number to its right: for example 3^2 is 9.
Modulo: %% The modulo returns the remainder of the division of the number to the left by
the number on its right, for example 5 modulo 3 or 5 %% 3 is 2. for example 28 modulo 6 or 28 %% 6 is 4 就是取余数 5➗3=2……3 最后输出的是3 再比如27➗3=9……0最后输出的是0