round_df {socviz}R Documentation

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

Details

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

Value

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

Author(s)

Kieran Healy

Examples

head(round_df(iris, 0))

[Package socviz version 1.2 Index]