round_if_num: round_if_num function

View source: R/format.R

round_if_numR Documentation

round_if_num function

Description

This function takes as it's input a dataframe and rounds all numeric variables to the number of digs supplied thus avoiding the error when applying 'round' to a dataframe that contains non-numeric variables

Usage

round_if_num(x, digs = 3, except = NULL)

Arguments

x

The dataset for which you want the numeric variables rounded

digs

the number of digits to round the numeric variables to

except

a vector of numeric variables to leave out of the rounding

Examples

round_if_num()

clmacleod/highlandr documentation built on Oct. 11, 2023, 8:04 p.m.