Calculate the Floor and Ceiling values in R Programming - floor() and ceiling() Function Last Updated : 03 Jun, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report floor() function in R Language returns the largest integer that is smaller than or equal to value passed to it as argument(i.e : rounds downs to the nearest integer). Syntax: floor(x) Parameter: x: Value to be rounded off Example 1: Python3 # R program to calculate floor value # Using floor() method answer1 <- floor(1.2) answer2 <- floor(1.5) answer3 <- floor(2.6) answer4 <- floor(-2.6) print(answer1) print(answer2) print(answer3) print(answer4) Output: 1 1 2 -3 ceiling() Function ceiling() function in R Language returns the smallest integer that is greater than or equal to the value passed to it as argument(i.e : rounds up to the nearest integer). Syntax: ceiling(x) Parameter: x: Value to be rounded off Example 1: Python3 # R program to calculate ceiling value # Using ceiling() method answer1 <- ceiling(1.2) answer2 <- ceiling(1.5) answer3 <- ceiling(2.6) answer4 <- ceiling(-2.6) print(answer1) print(answer2) print(answer3) print(answer4) Output: 2 2 3 -2 Comment More infoAdvertise with us Next Article Calculate the Floor and Ceiling values in R Programming - floor() and ceiling() Function S spp____ Follow Improve Article Tags : R Language R Math-Function Similar Reads Calculate Factorial of a value in R Programming - factorial() Function The factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. It is defined as: n! = n à (n - 1) à (n - 2) à ... à 2 à 1For example 5! = 5 à 4 à 3 à 2 à 1 = 1200! is defined to be 1.Factorials have important applications in mathematics, co 3 min read Rounding off to the ceiling or floor value in R Programming - trunc() Function trunc() function in R Language is used to return the largest integer that is smaller than or equal to x (i.e : rounds downs the nearest integer). trunc() function behaves as a ceiling function for negative number and floor function for positive number. Syntax: trunc(x) Parameter: x: Numeric value to 1 min read Calculate Rank of the Values of a Vector in R Programming - rank() Function rank() function in R Language is used to return the sample ranks of the values of a vector. Equal values and missing values are handled in multiple ways. Syntax: rank(x, na.last) Parameters: x: numeric, complex, character, and logical vector na.last: Boolean Value to remove NAs Example 1: Python3 1= 1 min read Check if a numeric value falls between a range in R Programming - between() function between() function in R Language is used to check that whether a numeric value falls in a specific range or not. A lower bound and an upper bound is specified and checked if the value falls in it. Syntax: between(x, left, right) Parameters: x: A numeric vector left, right: Boundary values Example 1: 2 min read Compute the Value of Poisson Density in R Programming - dpois() Function dpois() function in R Language is used to compute the Poisson Density for a set of Integer values. It also creates a density plot of poisson distribution. Syntax: dpois(vec, lambda)Parameters: vec: Sequence of integer values lambda: Average number of events per interval Example 1: Python3 # R pro 1 min read Like