Learn R Programming

ggstats (version 0.8.0)

label_number_abs: Label absolute values

Description

Label absolute values

Usage

label_number_abs(..., hide_below = NULL)

label_percent_abs(..., hide_below = NULL)

Value

A "labelling" function, , i.e. a function that takes a vector and returns a character vector of same length giving a label for each input value.

Arguments

...

arguments passed to scales::label_number() or scales::label_percent()

hide_below

if provided, values below hide_below will be masked (i.e. an empty string "" will be returned)

See Also

Examples

Run this code
x <- c(-0.2, -.05, 0, .07, .25, .66)

scales::label_number()(x)
label_number_abs()(x)

scales::label_percent()(x)
label_percent_abs()(x)
label_percent_abs(hide_below = .1)(x)

Run the code above in your browser using DataLab