knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
library(funkea)
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
gglabel
にラベルに頻用する単位をまとめる~
スタートsee_unicode()
で主要なunicodeを確認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"))
str_pad
x <- c(1, 20, 100, NA) lead_zero(x, 1) lead_zero(x, 2) lead_zero(x, 3)
sprintf
y <- c(0.1, 0.001, 0.09, NA) tail_zero(y, 1) tail_zero(y, 2) tail_zero(y, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.