Math in R

1. Basic Arithmetic Operations:

2. Maximum and Minimum Functions:

Use the following functions to find the min and max values:

  • min()
  • max()

3. Square Root:

Absolute (positive) : abs()

ceiling() and floor() and round()

  • The ceiling(): rounds a number upwards to the nearest integer
  • floor() function: rounds a number downwards to its nearest integer

round(): Round a number to a specified number of decimal places.
syntax round(variable, decimal places )

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top