Poll Question #1: Are you a graduate student, early career professional, or other?
Poll Question #2: Do you work with data?
R is a programming language that is specialized in statistical computing and analysis. This makes R popular in disciplines and fields such as: biostatistics, bioinformatics, finance, research, public health, epidemiology, and data science.
A programming language is a vocabulary and set of grammatical rules for instructing a computer or computing device to perform a specific task.
Point-&-Click Interface
vs.
Programming Language
Pros
Cons
# Load packages
library(tidyverse)
library(yarrr)
library(plotly)
plot <- ggplot(data = pirates) + # existing data set in R
# Define space:
aes(x = height, y = weight) +
# Add points:
geom_point(aes(color = sex, shape = sex)) +
# Change colours:
scale_color_manual(values = c("male" = "green", "female" = "blue", "other" = "red")) +
# Add trend line:
geom_smooth(method = lm, colour = "black", fill = "white") +
# Annotate with text:
annotate("text", x = 188, y = 55, label = "R=0.93") +
# x-axis title:
xlab("Height (cm)") +
# y-axis title:
ylab("Weight (kg)") +
# Main title:
ggtitle("Correlation Between Pirates' Weight and Height") +
# Clean background:
theme_minimal()
# Make the graph interactive:
ggplotly(plot)