Penguins

Author

Ivan Pozdniakov

Published

June 12, 2025

Непронумерованный список

Пингвины бывают разных видов:

  • Adelie

  • Gentoo

  • Chinstrap

  • Eudyptula

Пронумерованный список

А теперь составим их алфавитный порядок:

  1. Adelie

  2. Chinstrap

  3. Eudyptula

  4. Gentoo

А вот здесь более полный список.

Inline code, цитаты и footnotes

Я больше не хочу вести список! Я хочу писать код! mean(1:10) – вот этот код не выполнится, а вот этот выполнится: 5.5

Здесь должна быть цитата про пингвинов1

А это уже не цитата

Картинка

Виды пингвинов

Формула

\[\frac{\Sigma^n_{i=1}(x - \overline{x})^2}{n-1}\]

Пример кода

── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.4.2     ✔ tibble    3.2.1
✔ lubridate 1.9.2     ✔ tidyr     1.3.0
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(gt)
penguins <- read.csv("https://raw.githubusercontent.com/Pozdniakov/tidy_stats/refs/heads/master/data/penguins.csv")

Описательная статистика

penguins %>%
  drop_na() %>%
  group_by(island, species) %>%
  summarise(across(starts_with("bill"), list(mean = mean, sd = sd))) %>%
  gt()
`summarise()` has grouped output by 'island'. You can override using the
`.groups` argument.
species bill_length_mm_mean bill_length_mm_sd bill_depth_mm_mean bill_depth_mm_sd
Biscoe
Adelie 38.97500 2.480916 18.37045 1.188820
Gentoo 47.56807 3.106116 14.99664 0.985998
Dream
Adelie 38.52000 2.484276 18.24000 1.140598
Chinstrap 48.83382 3.339256 18.42059 1.135395
Torgersen
Adelie 39.03830 3.028097 18.45106 1.346472

График

gg <- ggplot(penguins) +
  geom_point(aes(x = bill_length_mm, y = bill_depth_mm, colour = species)) +
  ggsci::scale_colour_aaas() +
  hrbrthemes::theme_ipsum()
gg
Warning: Removed 2 rows containing missing values (`geom_point()`).

{plotly}


Attaching package: 'plotly'
The following object is masked from 'package:ggplot2':

    last_plot
The following object is masked from 'package:stats':

    filter
The following object is masked from 'package:graphics':

    layout

{echarts4r}

library(echarts4r)
penguins %>%
  drop_na() %>%
  group_by(species) %>%
  summarise(across(where(is.numeric), mean)) %>%
  e_charts(species) %>%
  e_line(bill_length_mm, smooth = TRUE) %>%
  e_area(bill_depth_mm, smooth = TRUE)

{DT}

library(DT)
datatable(penguins,
          class = "compact",
          style = "bootstrap4",
          extensions = 'FixedColumns')

{leaflet}

library(leaflet)
geo_penguins <- read_csv("https://raw.githubusercontent.com/Pozdniakov/tidy_stats/refs/heads/master/data/geo_penguins.csv")
Rows: 3 Columns: 3
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (1): island
dbl (2): latitude, longitude

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
leaflet(geo_penguins) %>%
  addTiles() %>%
  addMarkers(lng = ~longitude, lat = ~latitude, popup = ~island)

Footnotes

  1. Это не цитата, это ее отсутствие↩︎