library(dplyr)
## Warning: package 'dplyr' was built under R version 4.1.3
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
library(ggblanket)
library(palmerpenguins)
## Warning: package 'palmerpenguins' was built under R version 4.1.3
iris %>%
gg_point(x = Sepal.Width, y = Sepal.Length, col = Species)+
theme_bw(base_size=16)
## i {ggblanket} converts unspecified titles using snakecase::to_sentence_case. Use
## titles = ~.x to leave unspecified titles as is, and/or specify individual titles
## manually using *_title arguments.
## i {ggblanket} merges col and fill aesthetics into a single col aesthetic.

penguins %>%
gg_histogram(x = body_mass_g, col = species) +
theme_bw(base_size=16)
## i {ggblanket} converts unspecified titles using snakecase::to_sentence_case. Use titles = ~.x to leave unspecified titles as is, and/or specify individual titles manually using *_title arguments.
## i {ggblanket} merges col and fill aesthetics into a single col aesthetic.
## Warning: Removed 2 rows containing non-finite values (stat_bin).
## Warning: Removed 2 rows containing non-finite values (stat_bin).

penguins %>%
gg_density(x = body_mass_g, col = species,
pal = pals::brewer.dark2(3),
alpha = 0.5)+ theme_bw(base_size=16)
## i {ggblanket} converts unspecified titles using snakecase::to_sentence_case. Use titles = ~.x to leave unspecified titles as is, and/or specify individual titles manually using *_title arguments.
## i {ggblanket} merges col and fill aesthetics into a single col aesthetic.
## Warning: Removed 2 rows containing non-finite values (stat_density).
## Warning: Removed 2 rows containing non-finite values (stat_density).

penguins %>%
tidyr::drop_na() %>%
group_by(species, sex, island) %>%
summarise(body_mass_kg = mean(body_mass_g) / 1000) %>%
gg_col(x = body_mass_kg, y = species, col = sex, facet = island,
col_labels = stringr::str_to_sentence,
position = "dodge",
col_legend_place = "b")+ theme_bw(base_size=16)
## `summarise()` has grouped output by 'species', 'sex'. You can override using
## the `.groups` argument.
## i {ggblanket} converts unspecified titles using snakecase::to_sentence_case.
## Use titles = ~.x to leave unspecified titles as is, and/or specify individual
## titles manually using *_title arguments.
## i {ggblanket} merges col and fill aesthetics into a single col aesthetic.
## i {ggblanket} treats faceting as an aesthetic.
## Warning: Ignoring unknown parameters: stat

penguins %>%
group_by(species, sex) %>%
summarise(across(body_mass_g, ~ round(mean(.x, na.rm = TRUE)), 0)) %>%
gg_tile(sex, species, col = body_mass_g,
x_labels = snakecase::to_sentence_case,
pal = pals::brewer.blues(9),
width = 0.9,
height = 0.9,
title = "Average penguin body mass",
subtitle = "Palmer Archipelago, Antarctica",
theme = gg_theme(pal_axis = "#ffffff", pal_ticks = "#ffffff")) +
geom_text(aes(label = body_mass_g), col = "#232323", size = 3.5) + theme_bw(base_size=16)
## `summarise()` has grouped output by 'species'. You can override using the
## `.groups` argument.
## i {ggblanket} converts unspecified titles using snakecase::to_sentence_case.
## Use titles = ~.x to leave unspecified titles as is, and/or specify individual
## titles manually using *_title arguments.
## i {ggblanket} merges col and fill aesthetics into a single col aesthetic.

penguins %>%
tidyr::drop_na() %>%
gg_smooth(
x = bill_length_mm,
y = flipper_length_mm,
col = species,
level = 0.99,
size = 0.5
) + theme_bw(base_size=16)
## i {ggblanket} converts unspecified titles using snakecase::to_sentence_case. Use titles = ~.x to leave unspecified titles as is, and/or specify individual titles manually using *_title arguments.
## i {ggblanket} merges col and fill aesthetics into a single col aesthetic.
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
##
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
