Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

Arguments

x

A vector or data frame.

digits

Numeric, number of decimals to round to.

Value

x with all numeric variables rounded.

Examples

data(iris)
round_num(iris)

sjmisc

Data and Variable Transformation Functions

v2.8.6
GPL-3
Authors
Daniel Lüdecke [aut, cre] (<https://orcid.org/0000-0002-8895-3206>), Iago Giné-Vázquez [ctb], Alexander Bartel [ctb] (<https://orcid.org/0000-0002-1280-6138>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.