当前位置:网站首页>Visualization of R language penguins dataset

Visualization of R language penguins dataset

2022-06-22 20:53:00 Mrrunsen

Macro package palmerpenguins::penguins get data , A large number of penguin signs recorded , The features are as follows : species, island, bill_length_mm,bill_depth_mm, flipper_length_mm, body_mass_g,sex,year

Distribution of beak peak length of each type of penguin

library(palmerpenguins)
penguins %>%
  ggplot(aes(x = bill_length_mm)) +
  geom_density() +
  facet_wrap(vars(species), scales = "free")


The distribution of the beak peak length of each type of penguin is like a normal distribution

Distribution of beak peak length of each type of penguin ( Gender )

penguins %>%
  ggplot(aes(x = bill_length_mm)) +
  geom_boxplot(aes(fill = sex)) +
  facet_wrap(vars(species), scales = "free")

The beak peak of male penguins is longer than that of female penguins

penguins %>%
  ggplot(aes(
    x = bill_length_mm, y = bill_depth_mm,
    shape = species, colo
原网站

版权声明
本文为[Mrrunsen]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221917182311.html