round_df: Round down a data frame

View source: R/DFtools.R

round_dfR Documentation

Round down a data frame

Description

Tiny function just to round down a data frame for display in a table, ignoring non-numeric columns.

Usage

round_df(df, decimals = 2)

Arguments

df

A data frame to input

decimals

The number of decimal places to round to (default 2)

Details

This function replaces the now-defunct roundDF() from COINr < v1.0.

Value

A data frame, with any numeric columns rounded to the specified amount.

Examples

round_df( as.data.frame(matrix(runif(20),10,2)), decimals = 3)


COINr documentation built on May 29, 2024, 1:18 a.m.