round_df: Round doubles in a data.frame to a specified number of...

Description Usage Arguments Value Examples

View source: R/radiant.R

Description

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

Usage

1
round_df(tbl, dec = 3)

Arguments

tbl

Data frame

dec

Number of decimals to show

Value

Data frame with rounded doubles

Examples

1
2
data.frame(x = as.factor(c("a", "b")), y = c(1L, 2L), z = c(-0.0005, 3.1)) %>%
  round_df(dec = 2)

radiant-rstats/radiant.data documentation built on Nov. 13, 2018, 6:57 a.m.