Hepsi’s Workbook
Data Analysis with R
Using RStudio for Data Analysis with R.
Week One
Introduction to R on RStudio (basics of R)
Getting used to terminology, code structure, available options for different functions
Creation of workbook with Quarto using R
Using the published workbook as a space to add completed assignments and tasks
Meet the penguins
The penguins data from the palmerpenguins package contains size measurements for 344 penguins from three species observed on three islands in the Palmer Archipelago, Antarctica.
The plot below shows the relationship between flipper and bill lengths of these penguins.
flipper_hist <- ggplot(data = penguins, aes(x = flipper_length_mm)) +
geom_histogram(aes(fill = species),
alpha = 0.5,
position = "identity") +
scale_fill_manual(values = c("seagreen","blue","pink")) +
labs(x = "Flipper length (mm)",
y = "Frequency",
title = "Penguin flipper lengths")
flipper_hist`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Warning: Removed 2 rows containing non-finite outside the scale range
(`stat_bin()`).