Learn R Programming

NMA (version 3.1-1)

rdc: Rounding a numerical value

Description

A function that returns a rounded value as a character.

Usage

rdc(a,digits)

Value

  • The rounded value is returned as a character.

Arguments

a

A numerical value to be rounded

digits

Number of decimal places

Examples

Run this code
rdc(2.412, 3)
rdc(2.41, 3)
rdc(2.4, 3)
rdc(2, 3)

rdc(-2.41, 3)
rdc(-2.4, 3)
rdc(-2, 3)

rdc(0, 3)

Run the code above in your browser using DataLab