percent: percent: Format Numeric Values As (Character) Percentages

Description Usage Arguments Value Author(s)

View source: R/percent.R

Description

percent() reformats a (numeric) fraction as a (character) percentage

Usage

1
percent(fractions, digits, justify = F)

Arguments

fractions

numeric vector, matrix or array, where one corresponds to 100 columns of a data.frame.

digits

number of digits to the right of the decimal place to preserve. If missing, defaults to the minimum number of digits such that all results greater than zero will be represented as greater than zero.

justify

logical, should the results be right justified by padding with spaces?

Value

returns a character vector with same dimensions as fractions, where values are represented as percentages, including " are returned as "Inf" or "-Inf"; missing values as NA's (unquoted).

Author(s)

M.W.Rowe, mwr.stats@gmail.com


mwrowe/microRutils documentation built on June 12, 2021, 2:41 p.m.