Learn R Programming

COINr (version 1.1.14)

signif_df: Round a data frame to specified significant figures

Description

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

Usage

signif_df(df, digits = 3)

Value

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

Arguments

df

A data frame to input

digits

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

Examples

Run this code
signif_df( as.data.frame(matrix(runif(20),10,2)), digits = 3)


Run the code above in your browser using DataLab