knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

funkea

library(funkea)

ggplot theme

p <-
  mtcars %>%
  mutate(am = if_else(am == 0, "オートマティック", "マニュアル")) %>%
  ggplot(aes(hp, mpg, col = cyl)) +
  theme_grey() +
  geom_point() +
  facet_wrap(~ am)

p + 
  legend_topleft()

p +
  theme_funkea() +
  legend_topleft() # = p + theme_bw() + inwart_tick() + transparent + jpn

ggplot label

see_unicode()
qplot(1:5) + theme_bw() +
  labs(x = gglabel("\u2206 Temperature", type = "degC"),
       y = gglabel("PPFD", type = "muflux"),
       subtitle = gglabel(~CO[2], type = "muconc"))

zero filling

x <- c(1, 20, 100, NA)
lead_zero(x, 1)
lead_zero(x, 2)
lead_zero(x, 3)
y <- c(0.1, 0.001, 0.09, NA)
tail_zero(y, 1)
tail_zero(y, 2)
tail_zero(y, 3)


KeachMurakami/funkea documentation built on Nov. 26, 2024, 11:11 p.m.