If you provide a string value in X the function will try to round this if
a numeric text is present. If you want to skip certain rows/columns then
use the excl.* arguments.
Usage
txtRound(x, ...)
# S3 method for default
txtRound(x, digits = 0, digits.nonzero = NA,
txt.NA = "", dec = ".", scientific, ...)
The number of digits to round each element to.
If you provide a vector each element will apply to the corresponding columns.
digits.nonzero
The number of digits to keep if the result is close to
zero. Sometimes we have an entire table with large numbers only to have a
few but interesting observation that are really interesting
txt.NA
The string to exchange NA with
dec
The decimal marker. If the text is in non-english decimal
and string formatted you need to change this to the apropriate decimal
indicator.
scientific
If the value should be in scientific format.
excl.cols
Columns to exclude from the rounding procedure.
This can be either a number or regular expression. Skipped if x is a vector.
excl.rows
Rows to exclude from the rounding procedure.
This can be either a number or regular expression.