Learn R Programming

VFP (version 1.4.1)

Signif: Adapted Version of Function 'signif'

Description

This function adapts base-function signif by always returning integer values in case the number of requested significant digits is less than the the number of digits in front of the decimal separator.

Usage

Signif(x, digits = 4, force = TRUE, ...)

Value

number with 'digits' significant digits, if 'force=TRUE' "character" objects will be returned otherwise objects of mode "numeric"

Arguments

x

(numeric) value to be rounded to the desired number of significant digits

digits

(integer) number of significant digits

force

(logical) TRUE = force the return value to have at least 4 significant digits, i.e. to integers with less digits zeros will be appended after the decimal separator, otherwise the return value will be casted from character to numeric

...

additional parameters

Author

Andre Schuetzenmeister andre.schuetzenmeister@roche.com