round_df function

round_df

round_df

Round numeric columns of a data frame or tibble

round_df(data, dig = 2)

Arguments

  • data: A data frame or tibble
  • dig: The number of digits to round to

Returns

An object of the same class as data, with the numeric columns rounded off to dig

Details

Takes a data frame or tibble as input, rounds the numeric columns to the specified number of digits.

Examples

head(round_df(iris, 0))

Author(s)

Kieran Healy

  • Maintainer: Kieran Healy
  • License: MIT + file LICENSE
  • Last published: 2020-06-10