Learn R Programming

Tmisc (version 0.1.22)

dfsigfig: Round numeric columns of a data frame

Description

Round the numeric columns of a data frame to a specified number of significant digits.

Usage

dfsigfig(df, n = 3)

Arguments

df

A data.frame.

n

The number of significant digits to round off to.

Value

A data.frame rounded to n significant digits.

Examples

Run this code
# NOT RUN {
dfsigfig(mtcars,1)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab