Round Columns to given Number of Digits

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

Arguments

dframe

data frame containing numeric columns to be rounded

columnNames

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: columnName = numberOfDigits. If you give a list here, then there is no need to set the argument columnNames

Value

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