Learn R Programming

tidytidbits (version 0.3.3)

as_percentage_label: Format as percentage for output

Description

Vectorised conversion

Usage

as_percentage_label(x, decimal_places = 1, include_plus_sign = F)

Value

Character vector

Arguments

x

Numeric vector

decimal_places

Decimal places to display

include_plus_sign

prepend a "+" to the output if positive (if negative, a "-" must be prepended of course)

Examples

Run this code
as_percentage_label(0.746) # gives "74.6%"

Run the code above in your browser using DataLab