Learn R Programming

sjmisc (version 2.8.10)

round_num: Round numeric variables in a data frame

Description

round_num() rounds numeric variables in a data frame that also contains non-numeric variables. Non-numeric variables are ignored.

Usage

round_num(x, digits = 0)

Value

x with all numeric variables rounded.

Arguments

x

A vector or data frame.

digits

Numeric, number of decimals to round to.

Examples

Run this code
data(iris)
round_num(iris)

Run the code above in your browser using DataLab