Learn R Programming

api2lm (version 0.2)

format_perc_api2lm: Format percentages

Description

A recreation of the stats:::format.prec function that is only available internally to the stats package.

Usage

format_perc_api2lm(probs, digits)

Value

A vector of percentages

Arguments

probs

A vector of probabilities.

digits

a positive integer indicating how many significant digits are to be used for numeric and complex x. The default, NULL, uses getOption("digits"). This is a suggestion: enough decimal places will be used so that the smallest (in magnitude) number has this many significant digits, and also to satisfy nsmall. (For more, notably the interpretation for complex numbers see signif.)

See Also

Examples

Run this code
format_perc_api2lm(c(0.523423, 0.9098192, 0.951289), digits = 1)
format_perc_api2lm(c(0.523423, 0.9098192, 0.951289), digits = 3)

Run the code above in your browser using DataLab