round_df {COINr}R 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)


[Package COINr version 1.1.7 Index]