Funksjonen brukes i ggplot-kall og konverterer akselabels til å vise tall med tusenskille (standard er " ") og ønsket antall desimaler (standard er 2).
Examples
# Pakke for å laga figurar
library(ggplot2)
library(tibble)
#>
#> Attaching package: ‘tibble’
#> The following object is masked from ‘package:rapwhale’:
#>
#> num
a = tibble(
x = rnorm(100, 7500, 1000),
y = runif(100, 0, 1)
)
ggplot(a, aes(x = x, y = y)) +
geom_point() +
scale_x_continuous(labels = akse_tall_format(antall_desimaler = 0)) +
scale_y_continuous(labels = akse_prosent_format(antall_desimaler = 1))