Chapter 5 Scalars and vectors

Visual depiction of a scalar and vector. Deep shit. Wait until we get to matrices - you're going to lose it.

Figure 5.1: Visual depiction of a scalar and vector. Deep shit. Wait until we get to matrices - you’re going to lose it.

# Crew information
captain.name <- "Jack"
captain.age <- 33

crew.names <- c("Heath", "Vincent", "Maya", "Becki")
crew.ages <- c(19, 35, 22, 44)
crew.sex <- c(rep("M", times = 2), rep("F", times = 2))
crew.ages.decade <- crew.ages / 10

# Earnings over first 10 days at sea
days <- 1:10
gold <- seq(from = 10, to = 100, by = 10)
silver <- rep(50, times = 10)
total <- gold + silver

People are not objects. But R is full of them. Here are some of the basic ones.