Skip to content

Commit af58f79

Browse files
committed
Add penguin script
1 parent 98e445c commit af58f79

File tree

5 files changed

+62
-0
lines changed

5 files changed

+62
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata

Figures/Bill-features.png

39.2 KB
Loading

Figures/Flipper-length.png

37.3 KB
Loading

git-tutorial.Rproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Version: 1.0
2+
3+
RestoreWorkspace: Default
4+
SaveWorkspace: Default
5+
AlwaysSaveHistory: Default
6+
7+
EnableCodeIndexing: Yes
8+
UseSpacesForTab: Yes
9+
NumSpacesForTab: 2
10+
Encoding: UTF-8
11+
12+
RnwWeave: Sweave
13+
LaTeX: pdfLaTeX

penguins.R

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Example R script for Git tutorial
2+
# Alice Lepissier
3+
4+
5+
## ## ## ## ## ## ## ## ## ## ##
6+
# INDEX ####
7+
## ## ## ## ## ## ## ## ## ## ##
8+
# Preamble
9+
# Plotting penguin data
10+
11+
12+
13+
## ## ## ## ## ## ## ## ## ## ##
14+
# PREAMBLE ####
15+
## ## ## ## ## ## ## ## ## ## ##
16+
17+
library(ggridges)
18+
library(here)
19+
library(palmerpenguins)
20+
library(tidyverse)
21+
22+
23+
24+
## ## ## ## ## ## ## ## ## ## ##
25+
# PLOTTING PENGUIN DATA ####
26+
## ## ## ## ## ## ## ## ## ## ##
27+
28+
summary(penguins)
29+
30+
viz <- ggplot(penguins,
31+
aes(x = flipper_length_mm, y = species, fill = species)) +
32+
geom_density_ridges() +
33+
theme_minimal() +
34+
theme(legend.position = "none") +
35+
labs(title = "Distribution of penguin flipper length")
36+
ggsave(here("Figures", "Flipper-length.png"),
37+
width = 6, height = 5, units = "in")
38+
39+
viz <- ggplot(penguins,
40+
aes(x = bill_length_mm, y = bill_depth_mm, color = species)) +
41+
geom_point() +
42+
theme_minimal() +
43+
labs(title = "Length and depth of penguin bills")
44+
ggsave(here("Figures", "Bill-features.png"),
45+
width = 6, height = 5, units = "in")

0 commit comments

Comments
 (0)