x <- LETTERS[1:12]
str_keep_seq(x)
str_keep_seq(x, offset = -1)
str_keep_seq(x, by = 3)
str_keep_seq(x, by = 3, offset = -1)
str_keep_seq(x, by = 3, offset = 1)
y <- c(1000, 2000, 3000)
str_keep_seq(y)
str_keep_seq(y, big.mark = " ")
z <- c(0.0, 0.25, 0.5, 0.75, 1)
str_keep_seq(z)
str_keep_seq(z, drop0trailing = TRUE)
library(palmerpenguins)
penguins |>
gg_jitter(x = species,
y = body_mass_g,
col = flipper_length_mm,
facet = island,
facet2 = species,
y_breaks = scales::breaks_pretty(n = 10),
y_labels = \(x) str_keep_seq(x, by = 2),
x_labels = \(x) str_keep_seq(x, by = 2),
col_labels = \(x) str_keep_seq(x, by = 2, offset = -1))
Run the code above in your browser using DataLab