Simple math expressions in R
R scripts evaluate each expression and displays the result, which is similar to the behaviour of calculators. Usually, an expression is typed on its own line. Multiple expressions can be combined on the same line by using a ; (semicolon) to separate each expression. Anything that appears after the # symbol is considered to be comments and not evaluated.
http://hughesbennett.co.uk/SimpleMathExpressionsInR