Learn R Programming

radiant.data (version 0.6.0)

rounddf: Round double in a data.frame to a specified number of decimal places

Description

Round double in a data.frame to a specified number of decimal places

Usage

rounddf(tbl, dec = 3)

Arguments

tbl
Data frame
dec
Number of decimal places

Value

Data frame with rounded doubles

Examples

Run this code
data.frame(x = c("a","b"), y = c(1L, 2L), z = c(-0.0005, 3.1)) %>%
  rounddf(dec = 3)

Run the code above in your browser using DataLab