Learn R Programming

socviz (version 1.2)

round_df: round_df

Description

Round numeric columns of a data frame or tibble

Usage

round_df(data, dig = 2)

Arguments

data

A data frame or tibble

dig

The number of digits to round to

Value

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

Run this code
# NOT RUN {
head(round_df(iris, 0))
# }

Run the code above in your browser using DataLab