Skip to contents

Round Columns to given Number of Digits

Usage

roundColumns(
  dframe,
  columns = NULL,
  digits = NULL,
  pattern = NULL,
  columnNames = NULL
)

Arguments

dframe

data frame containing numeric columns to be rounded

columns

names of (numeric) columns in dframe to be rounded.

digits

number of digits to be rounded to (vector of length 1 expected) or list of assignments in the form: <column_name> = <n_digits>. If you give a list here, then there is no need to set the argument columnNames.

pattern

regular expression matching the names of the columns to be rounded. Will only be evaluated if no explicit column names are given in columnNames.

columnNames

deprecated. Use argument columns instead.

Value

dframe with columns given in columnNames being rounded to digits digits.