Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

3 ways to create vectors

  • c
  • seq
  • :
x = 1:3
y = seq(1, 3, 1)
z = c(1, 2, 3)
print(x)
print(y)
print(z)
print(x == y)
print(x == z)
print(y == z)

# 1 2 3
# 1 2 3
# 1 2 3
# TRUE TRUE TRUE
# TRUE TRUE TRUE
# TRUE TRUE TRUE